Scott Robertson
07/25/2024, 9:08 PM<NULL>
?
I have this kafka source:
CREATE TABLE kafka_source (
id INT,
name STRING,
ts TIMESTAMP(3),
WATERMARK FOR ts AS ts
) WITH (
'connector' = 'kafka',
'properties.bootstrap.servers' = 'kafka:9092',
'properties.group.id' = 'test',
'scan.startup.mode' = 'earliest-offset',
'topic' ='source',
'value.format' = 'json'
);
The WATERMARK seems to enable a TUMBLE window
SELECT * FROM TABLE(
TUMBLE(TABLE kafka_source, DESCRIPTOR(ts), INTERVAL '5' SECONDS));
I can insert fine:
INSERT INTO kafka_source
VALUES (1, 'matt', CURRENT_TIMESTAMP);
But the watermarks are all null.
i.e.
SELECT CURRENT_WATERMARK(ts) from kafka_source;
Opens a window, with a Table, and all the values are <NULL>
.
Why would all watermarks be <NULL>
?Scott Robertson
07/26/2024, 12:59 PMSELECT CURRENT_WATERMARK(ts) from kafka_source;
and in a second terminal
INSERT INTO kafka_source VALUES (1, 'matt', CURRENT_TIMESTAMP);
then the watermark is created