From d67d848047218caf2fbc712818ff7da0b7e8f5f3 Mon Sep 17 00:00:00 2001 From: Niall O'Riordan Date: Thu, 10 Mar 2022 21:33:30 +0000 Subject: [PATCH] resolve #54 Tables not cleaned up if materialized = table and static external location --- dbt/include/athena/macros/adapters/relation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/athena/macros/adapters/relation.sql b/dbt/include/athena/macros/adapters/relation.sql index 7e73aca7..0bf4f863 100644 --- a/dbt/include/athena/macros/adapters/relation.sql +++ b/dbt/include/athena/macros/adapters/relation.sql @@ -1,5 +1,5 @@ {% macro athena__drop_relation(relation) -%} - {% if config.get('incremental_strategy') == 'insert_overwrite' %} + {% if config.get('incremental_strategy') != 'append' %} {%- do adapter.clean_up_table(relation.schema, relation.table) -%} {% endif %} {% call statement('drop_relation', auto_begin=False) -%}