Please point out the mistake below I have approx 2 lac records in my sql which i am importing to ES , I want unique ids for each record using this fingerprint.
Can you explain what is not working? What is your output and what do you expect?
Also, since you are not setting the source option in the fingerprint filter, it will use the message field, do you have a message field in the event? You didn't share the entire pipeline, so there is no way to know.
Unless you have a message field to base the fingerprint on you need to specify the source field(s) to use in the plugin. It would help if you showed your full pipeline as well as a sample event.
@Christian_Dahlqvist JDBC output is same as I shared the sample data , I am basically getting the data from SQL and importing to ES, We can take any number of fields, like this I have 15 columns , How can I use fingerprint to generate a unique id for each record, as example we have UUID in python which generates unique id for each record, similarly how to use fingerprint to generate unique id?
Please show the sample document in JSON form as it looks when inserted into Elasticsearch. This will show the fields available, which depends on the SQL statement.
The fingerprint filter allows you to generate a hash based on some fields in the data that forms a primary key, which can be used as an ID. If you are running the JDBC query a number of times this will prevent duplicates from being created.
You could instead set the fingerprint plugin to generate a UUID, but that would be unique every time it runs for a record. If you reprocess the same data through the JDBC plugin that data would get inserted multiple times. Rather than using a UUID it would be more efficient to let Elasticsearch assign the ID.
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.