How to set `input-jdbc` statement let it can set variables?

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.