diff --git a/.changes/unreleased/Fixes-20220617-114443.yaml b/.changes/unreleased/Fixes-20220617-114443.yaml new file mode 100644 index 00000000000..4e3854d496f --- /dev/null +++ b/.changes/unreleased/Fixes-20220617-114443.yaml @@ -0,0 +1,7 @@ +kind: Fixes +body: Properly use quotes for Snowflake snapshots when checking all columns +time: 2022-06-17T11:44:43.978834+02:00 +custom: + Author: pquadri + Issue: "2975" + PR: "5389" diff --git a/core/dbt/include/global_project/macros/materializations/snapshots/strategies.sql b/core/dbt/include/global_project/macros/materializations/snapshots/strategies.sql index 43779b05bf6..63fa1b52808 100644 --- a/core/dbt/include/global_project/macros/materializations/snapshots/strategies.sql +++ b/core/dbt/include/global_project/macros/materializations/snapshots/strategies.sql @@ -133,7 +133,7 @@ {%- set intersection = [] -%} {%- for col in query_columns -%} {%- if col in existing_cols -%} - {%- do intersection.append(col) -%} + {%- do intersection.append(adapter.quote(col)) -%} {%- else -%} {% set ns.column_added = true %} {%- endif -%}