Imagine I asked you the same question, would you be able to give an accurate answer with the amount of information provided? Please revise your question.
Because the query returns the same data repeatedly? Have you looked at what the jdbc input documentation says about state and the sql_last_value parameter?
My logstash with this config file adding the same data repeatedly. It is like: I have 100 rows in database, but with a few time I will have 100...200...300...etc Why logstash adding the same data again and again?
You've configured the elasticsearch output to use the contents of the ID column as the document id. If that works as intended I don't see how you can possibly have 200 documents in ES. What document ids do you have, and how do they relate to the database table's ID column?
If I have this row document_id => "%{[ID]}", then I have updating my data all time.
If I dont have this row document_id => "%{[ID]}", then I have adding same data in elastic.
You're asking the same question as a couple of days ago (Updating data). Please continue that thread instead. I didn't see a response to my last post ("If your table has a column ...").
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.