Skip to content

Commit

Permalink
Update replace.sql (#186)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
5 people authored Jan 8, 2025
1 parent 47b19b0 commit 276ccff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240425-133610.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix is_replaceable check with wrong variable
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

0 comments on commit 276ccff

Please sign in to comment.