# Filter CSV and LF

**URL:** <https://discuss.elastic.co/t/filter-csv-and-lf/123894>\
**Category:** Logstash\
**Created:** [March 14, 2018, 11:51am UTC](https://discuss.elastic.co/t/filter-csv-and-lf/123894 "2018-03-14T11:51:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adolfo.diaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adolfo.diaz/32/28778_2.png) [@adolfo.diaz](https://discuss.elastic.co/u/adolfo.diaz)\
**Post date:** [March 14, 2018, 11:51am UTC](https://discuss.elastic.co/t/filter-csv-and-lf/123894/1 "2018-03-14T11:51:05Z")

</div>

Hi friends.

We have detected that when we are importing CSV files the last line in the CSV is not loaded in elasticsearch.  
We have verified that the csv files that arrive us to load do not bring "\ n" to the end of the last row, so I understand that the "input file" does not process it.  
Is this correct behavior?  
Or is there any way to tell logstash to load that line even if it does not have a "\ n" at the end?  
Thanks for your help.  
regards

---

<div class="post-metadata">

**Author:** ![Vaibhav\_Palve](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Vaibhav\_Palve](https://discuss.elastic.co/u/Vaibhav_Palve)\
**Post date:** [March 14, 2018, 2:04pm UTC](https://discuss.elastic.co/t/filter-csv-and-lf/123894/2 "2018-03-14T14:04:14Z")

</div>

For the filter, last line is not processed at the moment it occurs. It is waiting for the next line to evaluate what it is needed to do with it and the last line is in the buffer. If you are using Multiline codec, you can use auto\_flush which will flush the buffer after some time interval.

---

<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:** [April 11, 2018, 2:04pm UTC](https://discuss.elastic.co/t/filter-csv-and-lf/123894/3 "2018-04-11T14:04:27Z")

</div>

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