# Import data from SQL Server to ElasticSearch

**URL:** <https://discuss.elastic.co/t/import-data-from-sql-server-to-elasticsearch/11511>\
**Category:** Elasticsearch\
**Created:** [April 9, 2013, 4:17pm UTC](https://discuss.elastic.co/t/import-data-from-sql-server-to-elasticsearch/11511 "2013-04-09T16:17:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 9, 2013, 4:17pm UTC](https://discuss.elastic.co/t/import-data-from-sql-server-to-elasticsearch/11511/1 "2013-04-09T16:17:43Z")

</div>

I'm new to Elasticsearch, but I have a need to import data from a current  
SQL Server to an Elasticsearch server.

I've looked into some options including a river and bulk import. Setting  
up a river is not ideal for this circumstance since only specific data is  
needed in Elasticsearch, and I need to limit database traffic.

Ideally I would like to be able to run a command, perhaps through the "Any  
Request" panel of ElasticSearch Head (since it has a built-in "repeat  
request" option; ex. repeat every hour). Is it possible to write a PUT  
request that is able to run a query on SQL Server and then store/index that  
data in ElasticSearch?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 9, 2013, 10:39pm UTC](https://discuss.elastic.co/t/import-data-from-sql-server-to-elasticsearch/11511/2 "2013-04-09T22:39:57Z")

</div>

As a follow up, would it be possible for elasticsearch to connect to a  
webservice in increments? In my scenario, it may be better to have  
elasticsearch call a webservice (and pass in parameters) and have that  
service query the database and return a JSON document.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:41am UTC](https://discuss.elastic.co/t/import-data-from-sql-server-to-elasticsearch/11511/3 "2017-07-06T02:41:56Z")

</div>


