# When a JDBC input start, drops the previous if not completed?

**URL:** <https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416>\
**Category:** Logstash\
**Created:** [December 22, 2020, 6:15pm UTC](https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416 "2020-12-22T18:15:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)\
**Post date:** [December 22, 2020, 6:15pm UTC](https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416/1 "2020-12-22T18:15:28Z")

</div>

Lets say I got to index data from a week ago, and I use a schedule of 5 minutes in JDB input, and the data of a week cant be indexed in those 5 minutes, the data ingestion will be stopped at five minutes, and start again with a new last value? or will stop only when there is no more data in the database

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 22, 2020, 7:06pm UTC](https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416/2 "2020-12-22T19:06:19Z")

</div>

The query will execute until it is completed. It neither knows nor cares whether the plugin wants to run another query.

---

<div class="post-metadata">

**Author:** ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)\
**Post date:** [December 22, 2020, 7:49pm UTC](https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416/3 "2020-12-22T19:49:56Z")

</div>

So the last value will only update when I get all the data up until today?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 22, 2020, 8:01pm UTC](https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416/4 "2020-12-22T20:01:31Z")

</div>

If the data is sorted by timestamp then yes, the last value will be the last one to get indexed.

---

<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:** [January 19, 2021, 8:01pm UTC](https://discuss.elastic.co/t/when-a-jdbc-input-start-drops-the-previous-if-not-completed/259416/5 "2021-01-19T20:01:38Z")

</div>

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