Reputation: 11
input {
jdbc{
jdbc_connection_string => " "
jdbc_user => "temos"
jdbc_password => " "
jdbc_driver_library => "F:/logstash-6.3.0/bin/ojdbc6.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
statement=>"Select trnref from TANSACTION_IDS where trnref >
:sql_last_value order by trnref"
use_column_value => true
tracking_column => "trnref"
}
}
output {
elasticsearch{
index=>"transfernew"
document_type=>"trans"
document_id=>"%{trnref}"
hosts=>"localhost"
}
}
I have deleted .logstash_last_run file many times and then run the conf file but still the value of sql_last_run
is 0.
Upvotes: 1
Views: 1804
Reputation: 981
This is likely due to the column type of your tracking column. As per:
this must be numeric or a timestamp. If it is a string (or something else) in your database, you will get a 0 in the metadata file as you describe.
Upvotes: 1