...
Code Block | ||
---|---|---|
| ||
CREATE DYNAMIC TABLE [catalog_name.][db_name.]table_name [ ( [CONSTRAINT constraint<table_name] PRIMARY KEY (column_name, ...) NOT ENFORCED ) ]constraint> ]) ] [COMMENT table_comment] [PARTITIONED BY (partition_column_name1, partition_column_name2, ...)] [WITH (key1=val1, key2=val2, ...)] FRESHNESS = INTERVAL '<num>' { SECOND | MINUTE | HOUR | DAY | MONTH | YEAR } [REFRESH_MODE = { CONTINUOUS | FULL }] AS <select_statement> <table_constraint>: [CONSTRAINT constraint_name] PRIMARY KEY (column_name, ...) NOT ENFORCED |
Parameters:
- PRIMARY KEY: An optional list of columns uniquely identifies each row within the table. The column as primary key must be non-null.
- PARTITIONED BY: An optional list of columns of the table to partition the table by.
- WITH: Optionally sets one or more table properties.
- FRESHNESS: Define the time measure that the dynamic table’s content should lag behind updates to the base tables. This is merely a best-effort behavior, not a guarantee.
- REFRESH_MODE:An Optional clause specifies the refresh type for the dynamic table. This property can not be altered after the dynamic table is created.
- AS select_statement: This clause populates the dynamic table using the data from the select query. The base tables can be a dynamic table, table or view.
...