# Read data from RelationalDatabase to Elasticsearch

**URL:** <https://discuss.elastic.co/t/read-data-from-relationaldatabase-to-elasticsearch/156145>\
**Category:** Elasticsearch\
**Created:** [November 10, 2018, 2:17pm UTC](https://discuss.elastic.co/t/read-data-from-relationaldatabase-to-elasticsearch/156145 "2018-11-10T14:17:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [November 10, 2018, 2:17pm UTC](https://discuss.elastic.co/t/read-data-from-relationaldatabase-to-elasticsearch/156145/1 "2018-11-10T14:17:07Z")

</div>

Hi

I am bit confused here in reading data from Relational database to elasticsearch,should i use Logstash with jdbc input plugin or elasticsearch jbdc driver , which one fullfill my requirement ?

Please help me.

---

<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:** [November 10, 2018, 4:35pm UTC](https://discuss.elastic.co/t/read-data-from-relationaldatabase-to-elasticsearch/156145/2 "2018-11-10T16:35:08Z")

</div>

You can use Logstash with jdbc input plugin.

But I shared other thoughts there: [http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/](http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/)

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

---

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [November 12, 2018, 4:40am UTC](https://discuss.elastic.co/t/read-data-from-relationaldatabase-to-elasticsearch/156145/3 "2018-11-12T04:40:36Z")

</div>

Thanks David

---

<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:** [December 10, 2018, 4:40am UTC](https://discuss.elastic.co/t/read-data-from-relationaldatabase-to-elasticsearch/156145/4 "2018-12-10T04:40:38Z")

</div>

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