Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
-- configure in table options
CREATE TABLE user_actions (
  ...
  user_action_time TIMESTAMP(3),
  WATERMARK FOR user_action_time AS user_action_time - INTERVAL '5' SECOND
) WITH (
  'watermark.emit.strategy'='ON_EVENT',
  'watermark.emit.gap.on-event.gap'='10000',
  ...
);

-- use 'OPTIONS' hint
select ... from source_table /*+ OPTIONS('watermark.emit.strategy'='ON_EVENT', 'watermark.emit.gap.on-event.gap'='10000') */


Note that the option 'watermark.emit.gap.on-event.gap' which is used to configure how many events to emit a watermark only works for 'ON_EVENT' strategy,  This option is not required, the default value is 1.

...

Code Block
languagesql
'watermark.emit.strategy'='ON_EVENT',
'watermark.emit.gap.on-event.gap'='10000',
'source.idle-timeout'='1min',
'watermark.alignment.group'='alignment-group-1',
'watermark.alignment.max-drift'='1min',
'watermark.alignment.update-interval'='1s'

...