# Reading the heading (1st line) of CSV file through logstash

**URL:** <https://discuss.elastic.co/t/reading-the-heading-1st-line-of-csv-file-through-logstash/108930>\
**Category:** Logstash\
**Created:** [November 23, 2017, 5:53pm UTC](https://discuss.elastic.co/t/reading-the-heading-1st-line-of-csv-file-through-logstash/108930 "2017-11-23T17:53:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kiranilla](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@kiranilla](https://discuss.elastic.co/u/kiranilla)\
**Post date:** [November 24, 2017, 6:01am UTC](https://discuss.elastic.co/t/reading-the-heading-1st-line-of-csv-file-through-logstash/108930/5 "2017-11-24T06:01:18Z")

</div>

Thanks @guyboertje for you quick response..

As per your queries below:

How many different CSV structures do you need to parse?

_\> There is no limit for CSV structures, at present we have done for 2 but in future we are expecting more, so would like to generalize for all the structures._

Does the filename and/or path contain a clue to the type of CSV structure?

_\> Yes, filepath can be in one location(we can hard code the path) but filename varies._

---

_[View the full topic](https://discuss.elastic.co/t/reading-the-heading-1st-line-of-csv-file-through-logstash/108930)._
