From 0cdca13a23f7ae0d400c9c85d42649271a5a4253 Mon Sep 17 00:00:00 2001 From: rong fengliang <1141591465@qq.com> Date: Thu, 25 Apr 2024 12:24:05 +0800 Subject: [PATCH 1/3] Update replace.sql {% set is_replaceable = existing_relation.type == target_relation_type and existing_relation.can_be_replaced %} maybe {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %} --- dbt/include/global_project/macros/relations/replace.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/global_project/macros/relations/replace.sql b/dbt/include/global_project/macros/relations/replace.sql index adba77dc..2ba856df 100644 --- a/dbt/include/global_project/macros/relations/replace.sql +++ b/dbt/include/global_project/macros/relations/replace.sql @@ -8,7 +8,7 @@ {# /* use a create or replace statement if possible */ #} - {% set is_replaceable = existing_relation.type == target_relation_type and existing_relation.can_be_replaced %} + {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %} {% if is_replaceable and existing_relation.is_view %} {{ get_replace_view_sql(target_relation, sql) }} From 2b40da54ba896183ded2542c01f1bb0c89253bee Mon Sep 17 00:00:00 2001 From: rongfengliang <1141591465@qq.com> Date: Thu, 25 Apr 2024 13:37:45 +0800 Subject: [PATCH 2/3] add CHANGELOG --- .changes/unreleased/Fixes-20240425-133610.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changes/unreleased/Fixes-20240425-133610.yaml diff --git a/.changes/unreleased/Fixes-20240425-133610.yaml b/.changes/unreleased/Fixes-20240425-133610.yaml new file mode 100644 index 00000000..66469ce2 --- /dev/null +++ b/.changes/unreleased/Fixes-20240425-133610.yaml @@ -0,0 +1,7 @@ +kind: Fixes +body: change set is_replaceable = existing_relation.type == target_relation_type and + existing_relation.can_be_replaced to set is_replaceable = existing_relation.t +time: 2024-04-25T13:36:10.684598+08:00 +custom: + Author: rongfengliang + Issue: "187" From fbe57190f867b0d2dcb5b3e3acce078f90259303 Mon Sep 17 00:00:00 2001 From: rong fengliang <1141591465@qq.com> Date: Sat, 10 Aug 2024 08:15:18 +0800 Subject: [PATCH 3/3] Update Fixes-20240425-133610.yaml --- .changes/unreleased/Fixes-20240425-133610.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.changes/unreleased/Fixes-20240425-133610.yaml b/.changes/unreleased/Fixes-20240425-133610.yaml index 66469ce2..5d9689f6 100644 --- a/.changes/unreleased/Fixes-20240425-133610.yaml +++ b/.changes/unreleased/Fixes-20240425-133610.yaml @@ -1,6 +1,5 @@ kind: Fixes -body: change set is_replaceable = existing_relation.type == target_relation_type and - existing_relation.can_be_replaced to set is_replaceable = existing_relation.t +body: Fix is_replaceable check with wrong variable time: 2024-04-25T13:36:10.684598+08:00 custom: Author: rongfengliang