Ask Your Question
2

What is the syntax for watermark in SQL used in Databricks?

asked 2023-06-06 02:58:15 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2023-06-06 03:01:01 +0000

devzero gravatar image

The syntax for watermark in SQL used in Databricks is:

CREATE TABLE <table_name>
(<column_1> <data_type_1>,
<column_2> <data_type_2>,
<column_3> <data_type_3>,
…
…
…
<column_n> <data_type_n>)
USING <file_format>
OPTIONS (
  'path'='<path_to_data>',
  'checkpointLocation'='<path_to_checkpoint_directory>',
  'watermark'='<event_time_column_name>','<delay_threshold>'
);

where <table_name> is the name of the table, <column_1>, <column_2>, ..., <column_n> are the names of the columns in the table, <data_type_1>, <data_type_2>, ..., <data_type_n> are the data types of the columns in the table. <file_format> is the file format of the data, <path_to_data> is the path to the data, <path_to_checkpoint_directory> is the path to the checkpoint directory, <event_time_column_name> is the name of the event_time column in the table, and <delay_threshold> is the delay threshold.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-06 02:58:15 +0000

Seen: 14 times

Last updated: Jun 06 '23