The DDL for the event time attribute and watermark is:
CREATE TABLE user_actions (
user_name STRING,
data STRING,
user_action_time TIMESTAMP(3),
-- declare user_action_time as event time attribute and use 5 seconds delayed watermark strategy
WATERMARK FOR user_action_time AS user_action_time - INTERVAL '5' SECOND
) WITH (
...
);
I would ask the policy of new watermark generation:
With data stream, flink provides following two policies for watermark generation, what about in ddl?
- periodically like AssignerWithPeriodicWatermarks does,that is, try to generate new watermark periodically
- punctuated like AssignerWithPunctuatedWatermarks, that is,try to generate new watermark when new event comes.