kafka-tutorials
kafka-tutorials copied to clipboard
MINOR: Replace deprectated 'TIMESTAMPTOSTRING' with 'FORMAT_TIMESTAMP'
Description
Updated insert statements to use 'UNIX_TIMESTAMP()' to generate dates
This PR proposes to solve the "too old" date issue by using UNIX_TIMESTAMP() to generate dates for inserting the initial data for the tutorial. Additionally, the tutorial uses a deprecated method TIMESTAMPTOSTRING, so it's been replaced with the recommendedFORMAT_TIMESTAMP function.
NOTE There's one issue remaining - the test data relies on hardcoded dates in a JSON file, so the tests for this PR will fail until we develop approach for creating test data
Staging Docs
New tutorial checklist
oops I missed this:
NOTE There's one issue remaining - the test data relies on hardcoded dates in a JSON file, so the tests for this PR will fail until we develop approach for creating test data
How about:
- update the "dev" queries and expected outputs to not select timestamp / window boundaries
- update the "test" input / output timestamps to be hardcoded but recent
- add infinite retention so that we're safe against race condition build failures
That would get us to a happy place of improved quality and reliable build, right?
@davetroiano - PR updated
Should we do anything about stale dates with the ksql-test-runner? i.e., this part here
After spending a good deal of time on this, I think we should leave the dates for the test runner alone because updating requires a lot of manual work for little-to-no gain.
The timestamps used in the tutorial are set to use the current time so it should always work as expected for users working through the tutorial
Only one test failure and it's unrelated
Test for this PR passed https://confluentinc.semaphoreci.com/jobs/d8c26926-d73d-4f55-acfe-0feb12b2628f
After spending a good deal of time on this, I think we should leave the dates for the test runner alone because updating requires a lot of manual work for little-to-no gain.
@bbejeck sounds good, I agree
latest change unrelated to files for the tutorial so merging now
Thanks for the review @davetroiano!