【发布时间】:2019-09-26 20:16:54
【问题描述】:
所以我在我的 jdbc logstash 输入中使用以下查询。
statement => "SELECT * from mydata WHERE updated_on > :sql_last_value ORDER BY updated_on"
use_column_value =>true
tracking_column =>updated_on
tracking_column_type => "@timestamp"
或
statement => "SELECT * from mydata WHERE :sql_last_value > updated_on ORDER BY updated_on"
use_column_value =>true
tracking_column =>updated_on
tracking_column_type => "@timestamp"
这里,我的 :sql_last 值被认为是配置文件的最后运行时间。 示例:
"updated_on": "2019-09-26T08:11:00.000Z",
"@timestamp": "2019-09-26T08:17:52.974Z"
这里我的 sql_last_value 对应于@timestamp, 我希望它考虑 updated_on 。
如何更改它以考虑最后更新的日期而不是执行时间?
【问题讨论】:
标签: elasticsearch logstash elastic-stack