Skip to content

Commit ff201c0

Browse files
committed
create_intermediate_relation - bugfix for fusion
1 parent bfeb196 commit ff201c0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

macros/utils/table_operations/create_intermediate_relation.sql

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{% macro create_intermediate_relation(base_relation, rows, temporary, like_columns=none) %}
2-
{% set int_relation = elementary.edr_make_intermediate_relation(base_relation).incorporate(type='table') %}
2+
{% set int_relation = elementary.edr_make_intermediate_relation(base_relation) %}
3+
4+
{# It seems that in dbt-fusion we fail in case the database/schema are None and not passed explicitly
5+
through the "path" param (happens in temp tables for some adapters).
6+
So to be safe, we just pass all of them explicitly. #}
7+
{% set int_relation = int_relation.incorporate(
8+
type='table',
9+
path={"database": int_relation.database,
10+
"schema": int_relation.schema,
11+
"table": int_relation.identifier}
12+
) %}
313

414
{% if not elementary.has_temp_table_support() %}
515
{% set temporary = false %}

0 commit comments

Comments
 (0)