Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update replace.sql #186

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20240425-133610.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: change set is_replaceable = existing_relation.type == target_relation_type and
colin-rogers-dbt marked this conversation as resolved.
Show resolved Hide resolved
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"
2 changes: 1 addition & 1 deletion dbt/include/global_project/macros/relations/replace.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down
Loading