# Parsing CSV with different header

**URL:** <https://discuss.elastic.co/t/parsing-csv-with-different-header/321887>\
**Category:** Logstash\
**Created:** [December 23, 2022, 8:07am UTC](https://discuss.elastic.co/t/parsing-csv-with-different-header/321887 "2022-12-23T08:07:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKiD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skid/32/56535_2.png) [@SKiD](https://discuss.elastic.co/u/SKiD)\
**Post date:** [December 23, 2022, 8:07am UTC](https://discuss.elastic.co/t/parsing-csv-with-different-header/321887/1 "2022-12-23T08:07:07Z")

</div>

Hello,

I have some thousand CSV files which I need to index into elasticsearch. All of those CSV files have different headers. I tried to use the CSV filter for logstash, but then I read [THAT](https://discuss.elastic.co/t/multiple-csv-with-different-columns/271794/2). Besides of my incomprehension of the decision to only use autodetect\_column\_names once per startup of logstash and not once per pipeline, I can't find another way to make it work, without starting/stopping logstash for each single file over and over again.

Is there another way to do that?  
Are there any suggestions how to index many different CSV files with a different header at once?

Best wishes and a happy Christmas time!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 20, 2023, 8:07am UTC](https://discuss.elastic.co/t/parsing-csv-with-different-header/321887/2 "2023-01-20T08:07:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
