From a4dfa87360c16744e14407874ed57913efc39031 Mon Sep 17 00:00:00 2001 From: annaazizyan Date: Fri, 6 Oct 2023 09:56:11 +0100 Subject: [PATCH] Create temporary views with 'or replace' --- dbt/include/spark/macros/adapters.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/spark/macros/adapters.sql b/dbt/include/spark/macros/adapters.sql index 9e277dd68..bfc1f198d 100644 --- a/dbt/include/spark/macros/adapters.sql +++ b/dbt/include/spark/macros/adapters.sql @@ -138,7 +138,7 @@ {#-- We can't use temporary tables with `create ... as ()` syntax --#} {% macro spark__create_temporary_view(relation, compiled_code) -%} - create temporary view {{ relation }} as + create or replace temporary view {{ relation }} as {{ compiled_code }} {%- endmacro -%}