Skip to content

Commit 276ccff

Browse files
rongfengliangdbeatty10mikealfarecolin-rogers-dbtadrianburusdbt
authored
Update replace.sql (#186)
Co-authored-by: Doug Beatty <[email protected]> Co-authored-by: Mike Alfare <[email protected]> Co-authored-by: Colin Rogers <[email protected]> Co-authored-by: Adrian <[email protected]>
1 parent 47b19b0 commit 276ccff

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Fixes
2+
body: Fix is_replaceable check with wrong variable
3+
time: 2024-04-25T13:36:10.684598+08:00
4+
custom:
5+
Author: rongfengliang
6+
Issue: "187"

dbt/include/global_project/macros/relations/replace.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{# /* use a create or replace statement if possible */ #}
1010

11-
{% set is_replaceable = existing_relation.type == target_relation_type and existing_relation.can_be_replaced %}
11+
{% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}
1212

1313
{% if is_replaceable and existing_relation.is_view %}
1414
{{ get_replace_view_sql(target_relation, sql) }}

0 commit comments

Comments
 (0)