# Parsing growing csv files with Logstash?

**URL:** <https://discuss.elastic.co/t/parsing-growing-csv-files-with-logstash/181442>\
**Category:** Logstash\
**Created:** [May 16, 2019, 3:35pm UTC](https://discuss.elastic.co/t/parsing-growing-csv-files-with-logstash/181442 "2019-05-16T15:35:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgreszcz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sgreszcz/32/46322_2.png) [@sgreszcz](https://discuss.elastic.co/u/sgreszcz)\
**Post date:** [May 16, 2019, 3:35pm UTC](https://discuss.elastic.co/t/parsing-growing-csv-files-with-logstash/181442/1 "2019-05-16T15:35:10Z")

</div>

I have a use case where I need to parse and index csv files that are periodically collected. The challenge is that the CSV file could grow and get overwritten with more rows for some time until the next CSV with a new filename is created.

Is there any way for Logstash to read from the last row/record when it re-parses the same (but larger) CSV file or will it just need to re-process it and up-version the existing record in Elasticsearch?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 16, 2019, 4:03pm UTC](https://discuss.elastic.co/t/parsing-growing-csv-files-with-logstash/181442/2 "2019-05-16T16:03:58Z")

</div>

> [@sgreszcz](#):
>
> Is there any way for Logstash to read from the last row/record when it re-parses the same (but larger) CSV file

That is the default way a file input works if you have a sincedb (and you always have a sincedb -- sincedb\_path controls whether it is persisted across restarts).

---

<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:** [June 13, 2019, 4:04pm UTC](https://discuss.elastic.co/t/parsing-growing-csv-files-with-logstash/181442/3 "2019-06-13T16:04:03Z")

</div>

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