diff --git a/dbt/include/athena/macros/adapters.sql b/dbt/include/athena/macros/adapters.sql index 68739024..a02bb339 100644 --- a/dbt/include/athena/macros/adapters.sql +++ b/dbt/include/athena/macros/adapters.sql @@ -110,7 +110,9 @@ {% endmacro %} {% macro athena__drop_relation(relation) -%} - {%- do adapter.clean_up_table(relation.schema, relation.table) -%} + {% if config.get('incremental_strategy') == 'insert_overwrite' %} + {%- do adapter.clean_up_table(relation.schema, relation.table) -%} + {% endif %} {% call statement('drop_relation', auto_begin=False) -%} drop {{ relation.type }} if exists {{ relation }} {%- endcall %}