# "Moving data from Elastic Search to SQL Server"

**URL:** <https://discuss.elastic.co/t/moving-data-from-elastic-search-to-sql-server/189863>\
**Category:** Elasticsearch\
**Created:** [July 10, 2019, 7:57pm UTC](https://discuss.elastic.co/t/moving-data-from-elastic-search-to-sql-server/189863 "2019-07-10T19:57:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2web](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/m2web/32/43804_2.png) [@m2web](https://discuss.elastic.co/u/m2web)\
**Post date:** [July 10, 2019, 7:57pm UTC](https://discuss.elastic.co/t/moving-data-from-elastic-search-to-sql-server/189863/1 "2019-07-10T19:57:27Z")

</div>

I have found several SQL Relational Db solutions for moving data from a relational Db to Elastic Search. Is there a way to export data from Elastic Search to a relational Db such as SQL Server?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 11, 2019, 2:34am UTC](https://discuss.elastic.co/t/moving-data-from-elastic-search-to-sql-server/189863/2 "2019-07-11T02:34:29Z")

</div>

You can read data from elasticsearch using the logstash elasticsearch input plugin.

As for writing to the database, I don't think there's a direct way for this. I have seen this plugin but I think it's not actively maintained:

> **[theangryangel/logstash-output-jdbc](https://github.com/theangryangel/logstash-output-jdbc)**
>
> JDBC output for Logstash. Contribute to theangryangel/logstash-output-jdbc development by creating an account on GitHub.

You can write to another system though like Kafka and may be find another way from there.

You can also write your own program and use the scroll API then send each document to the database with your own code.

---

<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:** [August 8, 2019, 2:40am UTC](https://discuss.elastic.co/t/moving-data-from-elastic-search-to-sql-server/189863/3 "2019-08-08T02:40:51Z")

</div>

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