You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the macro work with materialised views in PostgreSQL?
My relations are materialised views but the output of the macro has no columns at all
WITH unioned AS ({{
dbt_utils.union_relations(
relations = [
source("workdocs", "sa_mv"),
source("workdocs", "sb_mv"),
source("workdocs", "sf_mv"),
source("workdocs", "sg_mv"),
source("workdocs", "sgh_mv"),
source("workdocs", "sh_mv"),
source("workdocs", "sh2_mv"),
source("workdocs", "sh3_mv"),
source("workdocs", "su_mv"),
source("workdocs", "suf_mv"),
source("workdocs", "sw_mv"),
]
)
}}
)
SELECT DISTINCT
-- This column is definitely in each source view
vs_nr
FROM unioned
but the result does not contain any columns:
createtable "dwh"."dbt_base"."bws__dbt_tmp"as
(
WITH unioned AS (
(
select
cast('"dwh"."wk"."sa_mv"'asTEXT) as _dbt_source_relation,
from"dwh"."wk"."sa_mv"
)
union all
(
select
cast('"dwh"."wk"."sb_mv"'asTEXT) as _dbt_source_relation,
from"dwh"."wk"."sb_mv"
)
The text was updated successfully, but these errors were encountered:
Does the macro work with materialised views in PostgreSQL?
My relations are materialised views but the output of the macro has no columns at all
but the result does not contain any columns:
The text was updated successfully, but these errors were encountered: