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

rename macro to workaround a dbt bug #27

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
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
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