# Jdbc input plugin full and incremental updates

**URL:** <https://discuss.elastic.co/t/jdbc-input-plugin-full-and-incremental-updates/201464>\
**Category:** Logstash\
**Created:** [September 27, 2019, 8:32pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-full-and-incremental-updates/201464 "2019-09-27T20:32:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ma3](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@ma3](https://discuss.elastic.co/u/ma3)\
**Post date:** [September 27, 2019, 8:32pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-full-and-incremental-updates/201464/1 "2019-09-27T20:32:22Z")

</div>

I'm using the jdbc input plugin to feed MySQL data into elasticsearch. I'm using `sql_last_value` to send incremental updates to elastic. Is there an automated way to send full updates to elasticsearch say every 24 hours and incremental updates every 5 min?

I know that we can use `clean_run` to do that, however the configuration file needs to be changed and is a manual process.

Please let me know your thoughts.

---

<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:** [September 27, 2019, 8:43pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-full-and-incremental-updates/201464/2 "2019-09-27T20:43:46Z")

</div>

Use two inputs on different schedules?

---

<div class="post-metadata">

**Author:** ![ma3](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@ma3](https://discuss.elastic.co/u/ma3)\
**Post date:** [September 27, 2019, 9:00pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-full-and-incremental-updates/201464/3 "2019-09-27T21:00:37Z")

</div>

I have two concerns taking this approach.

- I have around 50 indices, so that approach would make the config complex.

- What are implications of two output plugins trying to write to elastic at the same time?

I'm thinking if I should set up a cron to delete `.logstash_jdbc_last_run` file(s). Has anyone tried that? Any thoughts on this approach?

---

<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:** [October 25, 2019, 9:00pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-full-and-incremental-updates/201464/4 "2019-10-25T21:00:43Z")

</div>

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