-
Notifications
You must be signed in to change notification settings - Fork 190
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
[Feature] Add refresh_mode to macro snowflake__get_create_dynamic_table_as_sql #924
Comments
OK! Last I checked that wasn't a parameter, but now I see it's in the below doc Snowflake SQL Reference:
I agree that You're right to identify that dbt-snowflake/dbt/include/snowflake/macros/relations/dynamic_table/create.sql Lines 1 to 10 in c22e13e
The lowest-effort fix would be to modify to pepper in the two lines below to the macro. -- before DDL
{%- set refresh_mode = config.get('refresh_mode') -%}
-- before the line starting with "as (sql)"
{% if refresh_mode is not none -%}
REFRESH_MODE = {{ refresh_mode }}
{%- endif -%} @kylienhu you are unblocked to to try this today by putting the modified macro into your project's However, I see other parameters that are potentially useful we should also consider adding these. Other parameters not yet supported: |
Thank you for your response! I saw there might already be a PR that might tackle this issue? |
@kylienhu you are very right! thanks for finding it. Looks like its a few months old, we'll have to resolve some merge conflicts in it, after which we can get it reviewed and merged |
closing in favor of #868 |
Is this your first time submitting a feature request?
Describe the feature
I'm looking to set the parameter refresh_mode for dynamic tables on Snowflake. Can we add that parameter to the macro
snowflake__get_create_dynamic_table_as_sql
so it can be set throughdbt_project.yml
or config block?Describe alternatives you've considered
No response
Who will this benefit?
The incremental refresh feature of dynamic tables are still being developed and on some of my complicated models they took even longer than a full refresh. I would like to choose the refresh mode as full in these cases.
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: