0
votes

In the https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/streaming/time_attributes.html

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?

  1. periodically like AssignerWithPeriodicWatermarks does,that is, try to generate new watermark periodically
  2. punctuated like AssignerWithPunctuatedWatermarks, that is,try to generate new watermark when new event comes.
1

1 Answers

1
votes

The watermark is periodically assigned. You can specify the interval via the configuration pipeline.auto-watermark-interval.

Also note, that the API for Watermarks was changed in the DataStream API and the two classes you mention are deprecated by now.

[1] https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/event_timestamps_watermarks.html#introduction-to-watermark-strategies