From 4fed73013a4d7d690edcd1637a8fc68db24ecac3 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Wed, 10 Jun 2020 15:46:17 -0400 Subject: [PATCH] Snapshots: create relations w/ db=none --- dbt/include/spark/macros/materializations/snapshot.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt/include/spark/macros/materializations/snapshot.sql b/dbt/include/spark/macros/materializations/snapshot.sql index 105c13fdf..78214641b 100644 --- a/dbt/include/spark/macros/materializations/snapshot.sql +++ b/dbt/include/spark/macros/materializations/snapshot.sql @@ -35,7 +35,7 @@ {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier, schema=target_relation.schema, - database=target_relation.database, + database=none, type='view') -%} {% set select = snapshot_staging_table(strategy, sql, target_relation) %} @@ -90,7 +90,7 @@ {% endif %} {% set target_relation_exists, target_relation = get_or_create_relation( - database=model.database, + database=none, schema=model.schema, identifier=target_table, type='table') -%}