Hi, I'm super new and trying out the SQL client. W...
# troubleshooting
s
Hi, I'm super new and trying out the SQL client. Why would all watermarks be
<NULL>
? I have this kafka source:
Copy code
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
Copy code
SELECT * FROM TABLE(
   TUMBLE(TABLE kafka_source, DESCRIPTOR(ts), INTERVAL '5' SECONDS));
I can insert fine:
Copy code
INSERT INTO kafka_source
                      VALUES (1, 'matt', CURRENT_TIMESTAMP);
But the watermarks are all null. i.e.
Copy code
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>
?
nuts. ok. still learning the SQL client. If I have a Table open in 1 terminal using
SELECT 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