I have 2 questions about the jdbc and tracking columns that my google foo isn't coming up with a good answer for.
(my source server is a sql server 2008)
- How do you use multiple tracking_column at the same time. For example, my "table" is actually a view over multiple tables, so I need to have it select based on 2 columns (commandtime and commandid). I really don't want to have to build logstash task for each of the 10 tables in my view.
My query looks like:
"Select commandid, ...
WHERE CommandID > :sql_last_value
Order by CommandTime asc,CommandID asc"
- How do I handle auto reset of the sql_last_value? Everyday the base tables are renamed and new tables created at around midnight.
So the tracked id needs be reset to 0.
Is there an easy way to detect that the current ID isn't valid (maybe expiring after 10 minutes or something)?