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

Allow specifying new non-incremental view options for bigquery #39

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions materialized-views/macros/bigquery/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@
{%- set enable_refresh = config.get('auto_refresh', none) -%}
{%- set refresh_interval_minutes = config.get('refresh_interval_minutes', none) -%}
{%- set sql_header = config.get('sql_header', none) -%}
{%- set allow_non_incremental_definition = config.get('allow_non_incremental_definition', none) -%}
{%- set max_staleness = config.get('max_staleness', none) -%}

{{ sql_header if sql_header is not none }}

create materialized view {{relation}}
{{ dbt_labs_materialized_views.bigquery_options(
enable_refresh=enable_refresh,
refresh_interval_minutes=refresh_interval_minutes
refresh_interval_minutes=refresh_interval_minutes,
allow_non_incremental_definition=allow_non_incremental_definition,
max_staleness=max_staleness
) }}
as (
{{sql}}
{{ sql }}
)

{% endmacro %}
Expand Down