nick leeson
nick leeson

Reputation: 31

Snowflake Dynamic Tables dbt core

I am having trouble refreshing Dynamic Tables in Snowflake using dbt core . My dbt core versions are as follows Core:

      +schema: l10_staging
      +materialized: dynamic_table
      +on_configuration_change: apply
      +target_lag: downstream
      +snowflake_warehouse: compute_wh

DBT build creates the dbt models as Dynamic Tables but a dbt run does not refresh the Dynamic Table but instead generates this command in /target/run/ folder

        alter dynamic table "EDW_DB"."L10_STAGING"."MARA" set
            target_lag = 'downstream'
            warehouse = compute_wh

instead I would on a dbt run evoke to refresh the dynamic table.

        alter dynamic table "EDW_DB"."L10_STAGING"."MARA" REFRESH

Any pointers .

Upvotes: 0

Views: 291

Answers (1)

tony
tony

Reputation: 35

A dbt run does not trigger a refresh for dynamic tables; instead, Snowflake manages the refresh based on the target_lag and refresh_mode. To manually trigger a refresh, use:

sql
ALTER DYNAMIC TABLE my_dynamic_table REFRESH;

Upvotes: 0

Related Questions