Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20241108-154557.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Cleans up the temp table created by the merge incremental stratergy when checking the schema
time: 2024-11-08T15:45:57.570611Z
custom:
Author: joshuao11
Issue: "1389"
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@
{% do predicates.append(avoid_require_partition_filter) %}
{%- endif -%}

{% set build_sql = get_merge_sql(target_relation, source_sql, unique_key, dest_columns, predicates) %}
-- 1. Run merge statement
{{ get_merge_sql(target_relation, source_sql, unique_key, dest_columns, predicates) }};

{{ return(build_sql) }}
{% if tmp_relation_exists -%}
-- 2. clean up the temp table if we have used one
drop table if exists {{ tmp_relation }};
{%- endif -%}

{% endmacro %}