Skip to content
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

[ADAP-1076] [Feature] [Dynamic Tables] Add new parameter properties (REFRESH_MODE, INITIALIZE) #868

Closed
3 tasks done
sfc-gh-lkoh opened this issue Dec 18, 2023 · 2 comments · Fixed by #1081 or dbt-labs/docs.getdbt.com#5701
Assignees
Labels
feature:dynamic-tables type:enhancement New feature or request user docs [docs.getdbt.com] Needs better documentation

Comments

@sfc-gh-lkoh
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-snowflake functionality, rather than a Big Idea better suited to a discussion

Describe the feature

New parameters have been added to dynamic tables, please add them so that users can add them to the config and use the parameters.
The parameters are REFRESH_MODE, INITIALIZE.
image

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table

@github-actions github-actions bot changed the title [Feature] [Dynamic Tables] Add new parameter properties (REFRESH_MODE, INITIALIZE) [ADAP-1076] [Feature] [Dynamic Tables] Add new parameter properties (REFRESH_MODE, INITIALIZE) Dec 18, 2023
@Santhin
Copy link

Santhin commented Jan 4, 2024

For refresh_mode inside create macro it could be achieved with this:

{% macro snowflake__get_create_dynamic_table_as_sql(relation, sql) -%}

    create dynamic table {{ relation }}
        target_lag = '{{ config.get("target_lag") }}'
        warehouse = {{ config.get("snowflake_warehouse") }}
        refresh_mode = {{ config.get("refresh_mode", default='AUTO') }}
        as (
            {{ sql }}
        )
    ;

{%- endmacro %}

@matsavage
Copy link

Is there a timeline for this getting into main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment