# Deserializing avro file in logstash

**URL:** https://discuss.elastic.co/t/deserializing-avro-file-in-logstash/99793
**Category:** Logstash
**Created:** [September 8, 2017, 5:26am UTC](https://discuss.elastic.co/t/deserializing-avro-file-in-logstash/99793 "2017-09-08T05:26:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Pratheek](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@Pratheek](https://discuss.elastic.co/u/Pratheek)
#### Post date: [September 8, 2017, 5:26am UTC](https://discuss.elastic.co/t/deserializing-avro-file-in-logstash/99793/1 "2017-09-08T05:26:08Z")

</div>

Hi,

Its mentioned in the documentation for avro codec plugin that there is 'an unique method for deserializing an avro file'.Can anyone please provide me a sample snippet on how to process it in logstash using file input?

I tried using the following ,but it does not seem to work

input {  
file {  
path =\> "../ELK/backup\_avro\_file/twitter.avro"  
type =\> "avro"  
start\_position =\> "beginning"  
sincedb\_path =\> "null"  
}  
stdin {  
codec =\> avro {  
schema\_uri =\> "../ELK/backup\_avro\_file/twitter.avsc"  
}  
}  
}

filter{  
}

output{  
stdout {  
codec =\> rubydebug  
}  
}

It posts data to output only once,but that too without deserialisation (probably because I havent added any code for deserialising it as in the case we do for kakfa).Guessing since this considers it as an single avro record.

Thanks in advance!

---

<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 6, 2017, 5:26am UTC](https://discuss.elastic.co/t/deserializing-avro-file-in-logstash/99793/2 "2017-10-06T05:26:10Z")

</div>

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