# Elastic Search to pull data from DB2 at regular intervals

**URL:** <https://discuss.elastic.co/t/elastic-search-to-pull-data-from-db2-at-regular-intervals/157961>\
**Category:** Elasticsearch\
**Created:** [November 23, 2018, 6:02am UTC](https://discuss.elastic.co/t/elastic-search-to-pull-data-from-db2-at-regular-intervals/157961 "2018-11-23T06:02:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rameshkv1989](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@rameshkv1989](https://discuss.elastic.co/u/rameshkv1989)\
**Post date:** [November 23, 2018, 6:02am UTC](https://discuss.elastic.co/t/elastic-search-to-pull-data-from-db2-at-regular-intervals/157961/1 "2018-11-23T06:02:29Z")

</div>

Hi,

Any one has any idea how Elastic Search can pull data from DB2 at regular intervals.  
Can we use Logstash for querying DB2 continuously and push to Elastic Search.

Kindly advice.

---

<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 23, 2018, 6:22am UTC](https://discuss.elastic.co/t/elastic-search-to-pull-data-from-db2-at-regular-intervals/157961/2 "2018-11-23T06:22:57Z")

</div>

I shared most of my 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.

But if db2 has a jdbc connector you can use logstash jdbc input indeed.

---

<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 21, 2018, 6:28am UTC](https://discuss.elastic.co/t/elastic-search-to-pull-data-from-db2-at-regular-intervals/157961/3 "2018-12-21T06:28:07Z")

</div>

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