I'm new to logstash. Currently, I'm trying to create a custom document_id from the concatenation of two database columns.
My sql query inside the jdbc is as follows:
statement => "SELECT TOP 10 name, age, address FROM ECRITURE"
But, instead of getting a custom id composed of the name and the address, I only get the string "%{name}%{address}".
Anyone has an idea to how to treat this problem? Thank you
and I get the following document id : "%{name}%{adress}" instead of random_nameParis.
If I understand the problem correctly, I need to pass the values of the columns from the jdbc to the output. I thought that calling them with the "%{column_name}" is enough. But, it doesn't work.
Problem Solved.
Just in case someone else have the same problem, you only need to add an alias to the columns of the sql statement and then use those aliases in the output like this "%{alias_name}%{alias_address}"
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.