Hi,
I'm actually working on a Logstash demo.
The idea is simple :
I use the Kafka Input Method to read my String (message)
AND i'm trying to do a SQL query with the JDBC_Streaming filter (if possible not with ruby_code method) as type of :
statement => "SELECT * FROM Objects WHERE Objects.message = %{message}"
I've tried some like :
parameters => { "getter" => "%{message}"}
statement => "SELECT * FROM Objects WHERE Objects.message = :getter"
statement => "SELECT * FROM Objects WHERE Objects.message = :getter"
parameters => { "getter" => "%{message}"}
parameters => {"getter" => "SELECT * FROM Item WHERE reference='message1'"}
statement => ":getter"
statement => "SELECT * FROM Objects WHERE Objects.message = event.get('message')"
parameters => { "getter" => "%{[message]}" }
parameters => { "getter" => "%{[message]}%" }
parameters => { "getter" => "%{message}%" }
And in most case I've => _jdbcstreamingfailure",
or _jdbcstreamingdefaultsused"
or both...
my filter is made this way :
filter {
jdbc_streaming {
jdbc_driver_library => "/PATH/mysql-connector-java-5.1.36/mysql-connector-java-5.1.36-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://PATH/DB"
jdbc_user => "USER"
jdbc_password => "PASSWORD"
statement => "SELECT * FROM Item WHERE reference = :getter"
parameters => { "getter" => "1/nouvellerepublique/11979"}
target => "country_details"
}
}
If someone got an idea I'm all ears,
Best Regard,
AH_M7