kafka-tutorials icon indicating copy to clipboard operation
kafka-tutorials copied to clipboard

[DO NOT MERGE] update anomaly detection tutorial to use timestamps based on run time

Open davetroiano opened this issue 3 years ago • 0 comments

represents pattern for updating tutorials to treat time more dynamically.

A weakness is no longer having window start/end timestamps in expected output. Could be solved by generating these things dynamically, but I'm not sure that's worth it.

Another weakness is that this could likely still fail (the build, or when users run it) if it's run around midnight UTC because UNIX_TIME() is called multiple times. One solution for this is to have a single timestamp in a temp table but that seems ugly. Another idea I'd advocate is changing this particular example to use session window rather than tumbling.

A problem I'm not sure how we would solve is our use of ksql-test-runner, i.e., this bit that has fixed timestamps in the expected output. bear in mind that it's rendered here, so we can't really solve this only at the build level (e.g., by generating it dynamically). There would still be an issue with users running it.

davetroiano avatar Aug 04 '22 13:08 davetroiano