Sql_last_value is literal in query in stead of bind variable

IN my configuration file I'm using jdbc as input

statement => "select x.* from table x where x.snapshot > :sql_last_value"
last_run_metadata_path => "d:/tools/elastic/logstash_x.lastrun"
use_column_value => true
tracking_column => "snapshot"
record_last_run => true

I assumed :sql_last_value was used as a bind variable/parameter and not literally replaced by the last value.
Is there a setting to change behaviour and use as a real bind parameter?

This will prevent pollution of db memory with lots of simular statements with only a different id.

No way to make a statement a "PreparedStatement" where bind variable will be set with the value of sql_last_value?

something like:

parameters => { "last_value" => "sql_last_value" }
statement => "select x.* from table x where x.id > :last_value"

???

Bind variable info:

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