How create dynamic query in logstash?

Hi all. I need your help.
In my db config I have code look like this

jdbc {
		jdbc_connection_string => "jdbc:mysql//localhost:3306/mydb"
		jdbc_user => "root"
		jdbc_password => ""
		jdbc_driver_library => "C:/servers/elasticsearch/con.mysql.jdbc_5.1.5.jar"
		jdbc_driver_class => "com.mysql.jdbc.Driver"
		parameters => { "like" => "Beethoven" }
		statement => "Select* from users where name = :like"
	}

This statement is test and my goal will be very larg sql with more than 4-5 join with dynamic columns and values, Please help me. Can I pass this parameters dynamicly ?. For example I am using Elasticsearch PHP Client library.
Thanks
Yuri

no there is no way to "provide" a dynamic variable to an input like your asking. Inputs are the beginning of the data, so besides an environment variable ${HOME} once loaded you can not change how it is querying.

One thought your could have a table of your dynamic data just thought about this idea.

select * from users where ( select user from dynamic_users ) blah blah blah

1 Like

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