How to set input-jdbc
statement let it can set variables?
e.g.:
input {
jdbc {
#...
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "select * from table_name_%{+yyyyMM}"
#...
}
}
Or is there another solution?
How to set input-jdbc
statement let it can set variables?
e.g.:
input {
jdbc {
#...
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "select * from table_name_%{+yyyyMM}"
#...
}
}
Or is there another solution?
You could try loading the statement from a file via statement_filepath
then use scripting to add the yyyyMM
to the table name.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.