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


(Moln) #1

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?


(Guy Boertje) #2

You could try loading the statement from a file via statement_filepath then use scripting to add the yyyyMM to the table name.


(system) #3

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