Skip to content

Commit

Permalink
Merge pull request #27 from bqbooster/fix-backward-compat
Browse files Browse the repository at this point in the history
rename macro to workaround a dbt bug
  • Loading branch information
Kayrnt authored Sep 30, 2024
2 parents 5d73ba7 + 22d27ee commit fc41445
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240930-213044.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: rename macro to workaround a <1.6 bug
time: 2024-09-30T21:30:44.308764+02:00
custom:
Author: Kayrnt
Issue: "26"
2 changes: 1 addition & 1 deletion macros/materialization_view_if_explicit_projects.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
unless the entity is created in the same project that is issuing the query,
but these references are not project-qualified: "region-XXX.INFORMATION_SCHEMA.XXX"
-#}
{% macro materialization_view_if_explicit_projects() -%}
{% macro materialized_as_view_if_explicit_projects() -%}
{% if var('input_gcp_projects', []) | length == 0 %}
{{ return('ephemeral') }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion models/base/jobs_by_project_with_cost.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(
materialized=materialization_view_if_explicit_projects()
materialized=materialized_as_view_if_explicit_projects()
)
}}
{{ jobs_with_cost_base("information_schema_jobs_by_project", contains_query = True) }}
2 changes: 1 addition & 1 deletion models/base/jobs_with_cost.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(
materialized=materialization_view_if_explicit_projects()
materialized=materialized_as_view_if_explicit_projects()
)
}}
{{ jobs_with_cost_base("information_schema_jobs", contains_query = False) }}
2 changes: 1 addition & 1 deletion models/base/storage_with_cost.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(
materialized=materialization_view_if_explicit_projects()
materialized=materialized_as_view_if_explicit_projects()
)
}}
{# More details about base table in https://cloud.google.com/bigquery/docs/information-schema-tables -#}
Expand Down
2 changes: 1 addition & 1 deletion models/base/table_and_storage_with_cost.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(
materialized=materialization_view_if_explicit_projects()
materialized=materialized_as_view_if_explicit_projects()
)
}}
WITH base AS (
Expand Down

0 comments on commit fc41445

Please sign in to comment.