Skip to content

Commit a83f6a4

Browse files
authored
Drop target table before cloning (#1078)
1 parent 89f944e commit a83f6a4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Issue drop statement before cloning
3+
time: 2025-05-09T14:44:21.47639+12:00
4+
custom:
5+
Author: jeremyyeo
6+
Issue: "1077"

dbt-bigquery/src/dbt/include/bigquery/macros/materializations/clone.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
{% endmacro %}
44

55
{% macro bigquery__create_or_replace_clone(this_relation, defer_relation) %}
6+
drop table if exists {{ this_relation }};
67
create or replace
78
table {{ this_relation }}
8-
clone {{ defer_relation }}
9+
clone {{ defer_relation }};
910
{% endmacro %}

0 commit comments

Comments
 (0)