# What is the recommended process for bulk inserts?

**URL:** <https://discuss.elastic.co/t/what-is-the-recommended-process-for-bulk-inserts/72325>\
**Category:** Elasticsearch\
**Created:** [January 20, 2017, 7:23pm UTC](https://discuss.elastic.co/t/what-is-the-recommended-process-for-bulk-inserts/72325 "2017-01-20T19:23:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![baden0x1](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@baden0x1](https://discuss.elastic.co/u/baden0x1)\
**Post date:** [January 20, 2017, 7:23pm UTC](https://discuss.elastic.co/t/what-is-the-recommended-process-for-bulk-inserts/72325/1 "2017-01-20T19:23:10Z")

</div>

In SQL Server, we can define a [Table Valued Parameter (TVP)](https://msdn.microsoft.com/en-us/library/bb510489.aspx) that would contain the same structure as a [DataTable](https://msdn.microsoft.com/en-us/library/system.data.datatable(v=vs.110).aspx) in .Net.

On the application layer, we can populate a DataTable with thousands of records, then send that table as a single parameter to a SQL Server stored procedure for a bulk insert.

What would an equivalent strategy be with ElasticSearch?

---

<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:** [January 21, 2017, 8:26am UTC](https://discuss.elastic.co/t/what-is-the-recommended-process-for-bulk-inserts/72325/2 "2017-01-21T08:26:40Z")

</div>

Build a file with all the docs (in this format - [https://www.elastic.co/guide/en/elasticsearch/reference/5.1/docs-bulk.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/docs-bulk.html)) and then send it to ES.

---

<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:** [February 18, 2017, 8:27am UTC](https://discuss.elastic.co/t/what-is-the-recommended-process-for-bulk-inserts/72325/3 "2017-02-18T08:27:24Z")

</div>

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