DYNAMIC TABLE
Config path: /<database>/<schema>/dynamic_table/<name>.yaml
Example:
Schema
columns (dict)
{key} (ident) - column name
{value} (str) - column comment
text (str) - SQL query text
target_lag (str) - "X seconds / minutes / hours / days" or "downstream"
warehouse (ident) - warehouse used to refresh dynamic table
refresh_mode (str) - AUTO / FULL / INCREMENTAL
initialize (str) - ON_CREATE / ON_SCHEDULE
cluster_by (list)
{items} (str) - SQL expressions for CLUSTER BY
is_transient (bool) - make table TRANSIENT
retention_time (int) - data retention time in days
depends_on (list)
{items} (ident) - names of other dynamic tables which this dynamic table depends on
comment (str)
Policy reference parameters
aggregation_policy (dict)
columns (list)
{items} (ident) - optional reference column names defining "entity"
masking_policies (list)
{items} (dict)
columns (list)
{items} (ident) - reference column names
projection_policies (list)
{items} (dict)
column (ident) - reference column name
row_access_policy (dict)
columns (list)
{items} (ident) - reference column names
Usage notes
All tables referred by SQL query text should have change tracking enabled.
Schema objects should be referred using fully-qualified identifiers, with
${{ env_prefix }}
placeholder, database name, schema name and object name. It is currently required due to lack of scope during validation of SQL statement.
Additional privileges
owner_schema_read
- to read objects in other schemas;owner_warehouse_usage
- to use a warehouse;owner_integration
- to access objects in EXTERNAL STAGE linked to STORAGE INTEGRATION;
Links
Last updated