and I want to use jdbc plugin to perform a query like this: SELECT name where id=$id;
and grab the name where id is dynamicaly be read from the message and replace it .
after that the messages should be like this:
Hello
I read the documentation and I thought it is supposed to be a constant query on each filter but based on my above example my jdbc filter should be something like this:
filter {
jdbc_streaming {
jdbc_driver_library => "/path/to/mysql-connector-java-5.1.34-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/mydatabase"
jdbc_user => "me"
jdbc_password => "secret"
statement => "select name from mytable WHERE id= :id"
parameters => { "id" => "id"}
target => "name"
}
}
am i correct?
thank you for the answer.
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.