Skip to content

Commit 72c17c4

Browse files
authored
Fix: use adapter.get_columns_in_relation (#5232)
1 parent 3996a69 commit 72c17c4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Fixes
2+
body: Fix column comparison in snapshot_check_all_get_existing_columns to use adapter.get_columns_in_relation
3+
time: 2022-05-11T12:32:38.313321+02:00
4+
custom:
5+
Author: jtcohen6
6+
Issue: "5222"
7+
PR: "5232"

core/dbt/include/global_project/macros/materializations/snapshots/strategies.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
{% do exceptions.raise_compiler_error("Invalid value for 'check_cols': " ~ check_cols_config) %}
127127
{% endif %}
128128

129-
{%- set existing_cols = get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}
129+
{%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}
130130
{%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}
131131
{%- set ns.column_added = false -%}
132132

0 commit comments

Comments
 (0)