# I have tried to ingest 8 records data from database..but after some times the rows gets replicated.it is duplicated like 16,24,32...perioodically..how to clear this?

**URL:** <https://discuss.elastic.co/t/i-have-tried-to-ingest-8-records-data-from-database-but-after-some-times-the-rows-gets-replicated-it-is-duplicated-like-16-24-32-perioodically-how-to-clear-this/221811>\
**Category:** Logstash\
**Created:** [March 3, 2020, 5:41am UTC](https://discuss.elastic.co/t/i-have-tried-to-ingest-8-records-data-from-database-but-after-some-times-the-rows-gets-replicated-it-is-duplicated-like-16-24-32-perioodically-how-to-clear-this/221811 "2020-03-03T05:41:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chelseia](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@chelseia](https://discuss.elastic.co/u/chelseia)\
**Post date:** [March 3, 2020, 5:41am UTC](https://discuss.elastic.co/t/i-have-tried-to-ingest-8-records-data-from-database-but-after-some-times-the-rows-gets-replicated-it-is-duplicated-like-16-24-32-perioodically-how-to-clear-this/221811/1 "2020-03-03T05:41:55Z")

</div>

input{  
jdbc{  
clean\_run =\> true  
jdbc\_driver\_library =\> "C:/Program Files/SQL Developer 4/jdbc/lib/ojdbc8.jar"  
jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver"  
jdbc\_connection\_string =\> "some connection string"  
jdbc\_user =\> "root"  
jdbc\_password =\> "root"  
statement =\> "select \* from weatherd WHERE low\_temp \> :sql\_last\_value"   
use\_column\_value =\> true  
tracking\_column =\> "low\_temp"  
schedule =\> "\*/5 \* \* \* \*"  
}  
}  
output{  
elasticsearch{  
hosts =\>"[http://localhost:9200](http://localhost:9200)"  
index =\>"weather1"  
}  
stdout{}  
}

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [March 3, 2020, 1:49pm UTC](https://discuss.elastic.co/t/i-have-tried-to-ingest-8-records-data-from-database-but-after-some-times-the-rows-gets-replicated-it-is-duplicated-like-16-24-32-perioodically-how-to-clear-this/221811/2 "2020-03-03T13:49:55Z")

</div>

Hi,

I have had this problem too a while ago: You are missing the parameter last\_run\_metadata\_path: [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#\_state](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#_state)

This must point to a file which will then contain the last value.

Best regards  
Wolfram

---

<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:** [March 31, 2020, 1:50pm UTC](https://discuss.elastic.co/t/i-have-tried-to-ingest-8-records-data-from-database-but-after-some-times-the-rows-gets-replicated-it-is-duplicated-like-16-24-32-perioodically-how-to-clear-this/221811/3 "2020-03-31T13:50:03Z")

</div>

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