# How to write output to avro file from logstash using avro codec

**URL:** https://discuss.elastic.co/t/how-to-write-output-to-avro-file-from-logstash-using-avro-codec/42406
**Category:** Logstash
**Created:** [February 22, 2016, 4:16pm UTC](https://discuss.elastic.co/t/how-to-write-output-to-avro-file-from-logstash-using-avro-codec/42406 "2016-02-22T16:16:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sdaruna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sdaruna/32/7289_2.png) [@sdaruna](https://discuss.elastic.co/u/sdaruna)
#### Post date: [February 22, 2016, 4:16pm UTC](https://discuss.elastic.co/t/how-to-write-output-to-avro-file-from-logstash-using-avro-codec/42406/1 "2016-02-22T16:16:19Z")

</div>

Hi.

I have file input that is in json format. How can i write to avro file output using elasticsearch.?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [February 22, 2016, 6:07pm UTC](https://discuss.elastic.co/t/how-to-write-output-to-avro-file-from-logstash-using-avro-codec/42406/2 "2016-02-22T18:07:43Z")

</div>

You mean "using Logstash", right? You already have a thread for this; [Unable to write to avro file from logstash](https://discuss.elastic.co/t/unable-to-write-to-avro-file-from-logstash/42410). Let's not fragment the discussion.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 23, 2016, 12:00am UTC](https://discuss.elastic.co/t/how-to-write-output-to-avro-file-from-logstash-using-avro-codec/42406/3 "2016-02-23T00:00:08Z")

</div>

As mentioned, please use [Unable to write to avro file from logstash](https://discuss.elastic.co/t/unable-to-write-to-avro-file-from-logstash/42410)

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 23, 2016, 12:00am UTC](https://discuss.elastic.co/t/how-to-write-output-to-avro-file-from-logstash-using-avro-codec/42406/4 "2016-02-23T00:00:12Z")

</div>


