# Getting Json from a CSV

**URL:** <https://discuss.elastic.co/t/getting-json-from-a-csv/27800>\
**Category:** Logstash\
**Created:** [August 20, 2015, 8:37pm UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800 "2015-08-20T20:37:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rnigam](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@rnigam](https://discuss.elastic.co/u/rnigam)\
**Post date:** [August 20, 2015, 8:37pm UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800/1 "2015-08-20T20:37:15Z")

</div>

Hi,

I have a usecase where I have CSV files with a few columns with JSON values. How can I take the get the JSON column and store it in elasticsearch?

Thanks a lot! Much appreciate everyone's help.

Regards,  
Rajat

---

<div class="post-metadata">

**Author:** ![ea\_fox](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@ea\_fox](https://discuss.elastic.co/u/ea_fox)\
**Post date:** [August 20, 2015, 8:56pm UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800/2 "2015-08-20T20:56:53Z")

</div>

Hi, see [github.com/AgileWorksOrg/elasticsearch-river-csv](http://github.com/AgileWorksOrg/elasticsearch-river-csv) for example or www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html will be interesting for you

---

<div class="post-metadata">

**Author:** ![rnigam](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@rnigam](https://discuss.elastic.co/u/rnigam)\
**Post date:** [August 20, 2015, 9:46pm UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800/3 "2015-08-20T21:46:03Z")

</div>

Thank you for the response. I did explore the csv filter earlier but what is not clear to me is if the column value will automatically be recognized as a JSON and then further parsed before being saved to EMR.

---

<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:** [August 21, 2015, 6:02am UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800/4 "2015-08-21T06:02:03Z")

</div>

Use a [csv filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html) to split up the CSV strings, then use the [json filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-json.html) on the field(s) containing JSON data.

---

<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:** [August 21, 2015, 10:48am UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800/5 "2015-08-21T10:48:43Z")

</div>

Don't user rivers, they are deprecated!

---

<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:** [July 6, 2017, 5:31am UTC](https://discuss.elastic.co/t/getting-json-from-a-csv/27800/6 "2017-07-06T05:31:21Z")

</div>


