# Logstash jdbc input state

**URL:** https://discuss.elastic.co/t/logstash-jdbc-input-state/321192
**Category:** Logstash
**Tags:** elastic-stack-sql, jdbc
**Created:** [December 14, 2022, 8:09am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-state/321192 "2022-12-14T08:09:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mahdi\_Moazami](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahdi_moazami/32/113304_2.png) [@Mahdi\_Moazami](https://discuss.elastic.co/u/Mahdi_Moazami)
#### Post date: [December 14, 2022, 8:09am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-state/321192/1 "2022-12-14T08:09:04Z")

</div>

Hi there elastic team,  
Suppose i have multiple pipelines each with one jdbc input. each of them execute a sql query that uses the value of **sql\_last\_value** to fetch only updated data and each pipeline file targets a specific table in db.  
My question is that is it necessary to define **last\_run\_metadata\_path** param for each of the pipelines so that the state of 'sql\_last\_value' be specific to that pipeline and not be shared among jdbc inputs or the logstash by default consider a seperate file for each pipeline to keep the state of them?

---

<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 14, 2022, 3:43pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-state/321192/2 "2022-12-14T15:43:48Z")

</div>

> [@Mahdi\_Moazami](#):
>
> is it necessary to define **last\_run\_metadata\_path** param for each of the pipelines so that the state of 'sql\_last\_value' be specific to that pipeline and not be shared among jdbc inputs

Yes, it is.

---

<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 11, 2023, 3:44pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-state/321192/3 "2023-01-11T15:44:02Z")

</div>

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