From 223a8e68cee71293bbecb76b5126139539dba3b4 Mon Sep 17 00:00:00 2001 From: Pradeep Srikakolapu Date: Fri, 24 May 2024 06:00:12 -0700 Subject: [PATCH] Update materialized_view.sql --- .../models/materialized_view/materialized_view.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbt/include/synapse/macros/materializations/models/materialized_view/materialized_view.sql b/dbt/include/synapse/macros/materializations/models/materialized_view/materialized_view.sql index f7251d9..feb2e79 100644 --- a/dbt/include/synapse/macros/materializations/models/materialized_view/materialized_view.sql +++ b/dbt/include/synapse/macros/materializations/models/materialized_view/materialized_view.sql @@ -32,8 +32,8 @@ they return none -- drop the temp relations if they exist already in the database - {{ synapse__drop_relation(preexisting_backup_relation) }} - {{ synapse__drop_relation(preexisting_intermediate_relation) }} + {% do adapter.drop_relation(preexisting_backup_relation) %} + {% do adapter.drop_relation(preexisting_intermediate_relation) %} {{ run_hooks(pre_hooks, inside_transaction=False) }} @@ -43,8 +43,8 @@ {% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %} -- drop the temp relations if they exist to leave the database clean for the next run - {{ synapse__drop_relation_script(backup_relation) }} - {{ synapse__drop_relation_script(intermediate_relation) }} + {% do adapter.drop_relation(preexisting_backup_relation) %} + {% do adapter.drop_relation(preexisting_intermediate_relation) %} {{ run_hooks(post_hooks, inside_transaction=False) }}