# Index a large dataset into elasticsearch

**URL:** <https://discuss.elastic.co/t/index-a-large-dataset-into-elasticsearch/46535>\
**Category:** Elasticsearch\
**Created:** [April 6, 2016, 1:27pm UTC](https://discuss.elastic.co/t/index-a-large-dataset-into-elasticsearch/46535 "2016-04-06T13:27:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/denny/32/9157_2.png) [@Denny](https://discuss.elastic.co/u/Denny)\
**Post date:** [April 6, 2016, 1:27pm UTC](https://discuss.elastic.co/t/index-a-large-dataset-into-elasticsearch/46535/1 "2016-04-06T13:27:58Z")

</div>

Hello,

I've been playing around with elasticsearch and graph for a while and a lot is very promising!

I'm stuck when it comes to parsing JSON-datasets containing millions of rows with the bulk api. I have to add a header to each line which is doable when the dataset isn't big so I can do it manually, but if it's a large dataset then I don't know the options on how to do it. Can't find it in the O'Reilly book and I've googled a lot but I haven't found a definitive answer on how experienced Elasticsearch users deal with indexing large datasets with the bulk api and having to add headers to each line. Do you use programming languages or any other solutions?

Any help would be appreciated. I can read some code but I'm not a programmer by the way.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 6, 2016, 1:31pm UTC](https://discuss.elastic.co/t/index-a-large-dataset-into-elasticsearch/46535/2 "2016-04-06T13:31:43Z")

</div>

You can use Logstash for this. It has a codec as well as filter for parsing JSON data, especially if it is one JSON object per line, and should be relatively easy to set up.

---

<div class="post-metadata">

**Author:** ![Denny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/denny/32/9157_2.png) [@Denny](https://discuss.elastic.co/u/Denny)\
**Post date:** [April 6, 2016, 1:33pm UTC](https://discuss.elastic.co/t/index-a-large-dataset-into-elasticsearch/46535/3 "2016-04-06T13:33:37Z")

</div>

Sounds good, thanks for your quick reply! I will give it a go.

---

<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 5, 2017, 11:01pm UTC](https://discuss.elastic.co/t/index-a-large-dataset-into-elasticsearch/46535/4 "2017-07-05T23:01:52Z")

</div>


