-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add refresh_mode
and initialize
as dynamic table options
#1081
Conversation
…mic-table-parameters
dbt/include/snowflake/macros/relations/dynamic_table/replace.sql
Outdated
Show resolved
Hide resolved
refresh_mode
, initialize
, and comment
as dynamic table optionsrefresh_mode
and initialize
as dynamic table options
@@ -1,8 +1,16 @@ | |||
{% macro snowflake__get_create_dynamic_table_as_sql(relation, sql) -%} | |||
|
|||
{%- set dynamic_table = relation.from_config(config.model) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the RelationConfig
allows us to easily incorporate input validation for refresh_mode
and initialize
. If we're doing that, we should pull all attribution from this class, hence updating target_lag
and snowflake_warehouse
.
{% macro snowflake__get_replace_dynamic_table_sql(relation, sql) %} | ||
{% macro snowflake__get_replace_dynamic_table_sql(relation, sql) -%} | ||
|
||
{%- set dynamic_table = relation.from_config(config.model) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as for snowflake__get_create_dyanmic_table_sql
.
as ( | ||
{{ sql }} | ||
) | ||
; | ||
{{ snowflake__refresh_dynamic_table(relation) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now handled via the initialize
parameter. Since initialize
defaults to ON_CREATE
, this is consistent with the current behavior.
Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#5678 |
PR created here for the docs update: https://github.com/dbt-labs/docs.getdbt.com/pull/5743/files |
Is there a timeline for including this in a release? |
+1 this would be super helpful for our team |
Any ETA on this feature release? Is v1.8.4 coming anytime soon? |
resolves #868
This PR continues @HenkvanDyk's work in #893.
Note
We are not adding
commment
here since that is already managed via the standard configdescription
. We'll make sure that the docs reflect this.Checklist