# CSV Output replace file

**URL:** <https://discuss.elastic.co/t/csv-output-replace-file/200332>\
**Category:** Logstash\
**Created:** [September 20, 2019, 3:04am UTC](https://discuss.elastic.co/t/csv-output-replace-file/200332 "2019-09-20T03:04:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sketchy](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Sketchy](https://discuss.elastic.co/u/Sketchy)\
**Post date:** [September 20, 2019, 3:04am UTC](https://discuss.elastic.co/t/csv-output-replace-file/200332/1 "2019-09-20T03:04:03Z")

</div>

I am using logstash to create CSV based dictionary's for use with other pipelines, all works well except I want it to replace the CSV each time it runs. With the file output you have the option of

write\_behavior = "overwrite".

Is there something equivalent for the CSV output?  
So far I can only get it to append to the existing CSV which is not suitable. I want it to overwrite the CSV each time it runs so I can have it create new dictionary CSV's once per day.

---

<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:** [October 18, 2019, 3:04am UTC](https://discuss.elastic.co/t/csv-output-replace-file/200332/2 "2019-10-18T03:04:07Z")

</div>

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