# Dump elasticsearch documents into avro format

**URL:** https://discuss.elastic.co/t/dump-elasticsearch-documents-into-avro-format/281146
**Category:** Logstash
**Created:** [August 12, 2021, 4:43am UTC](https://discuss.elastic.co/t/dump-elasticsearch-documents-into-avro-format/281146 "2021-08-12T04:43:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sagar\_kadu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagar_kadu/32/76973_2.png) [@Sagar\_kadu](https://discuss.elastic.co/u/Sagar_kadu)
#### Post date: [August 12, 2021, 4:43am UTC](https://discuss.elastic.co/t/dump-elasticsearch-documents-into-avro-format/281146/1 "2021-08-12T04:43:10Z")

</div>

I want to store elasticsearch query results into avro files using logstash..As far as I know there file output logstash plugin which by default stores JSON documents.

> **[File output plugin | Logstash Reference \[7.14\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-file.html)**

 ![ATNP8](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7d235f5fa1b1b7327d2cb56b72655d723834d92a.png)

after going through logstash documentation,I could see there avro codec plugin which can be used to serialize logstash events(i.e. elasticSearch query) but looks like it doesn't support writing data into avro files

> **[Avro codec plugin | Logstash Reference \[7.14\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-avro.html)**

 ![ZyVIz](https://us1.discourse-cdn.com/elastic/original/3X/4/5/4565be56713028a7359dbb37460f0b3d43577b8d.png)

Can anyone please help if there is any utility/logstash plugin available to dump JSON documents into avro format?

Appreciate your help. thank you

---

<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: [September 9, 2021, 4:43am UTC](https://discuss.elastic.co/t/dump-elasticsearch-documents-into-avro-format/281146/2 "2021-09-09T04:43:19Z")

</div>

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