Jdbc_streaming statement using a field from input?

Hello ,

I have a jdbc_streaming filter and I want to pass statement as a field value from input . I tried different ways to inject field value in statement but always seeing

"exception":"Java::JavaSql::SQLSyntaxErrorException: ORA-00900: invalid SQL statement\n"

filter {

jdbc_streaming {
jdbc_driver_library => "C:/Software/ojdbc8-21.5.0.0.jar"
jdbc_driver_class => "Java::oracle.jdbc.driverOracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@//00.0.00.000:1521/DV1"
jdbc_user => "DB"
jdbc_password => "pass"
statement => ":str"
parameters => { "str" => "myQuery"}
target => "terminal_map"
default_hash => {
terminal_map => ""
}
}
}

Also tried : statement => ["[myQuery]"] , statement => ["myQuery"]
SQL query is valid but looks like I am not able to place it in statement tag..

Any help is greatly appreciated!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.