Skip to content

Commit

Permalink
Avoid clean up of table wen incremental_strategy is not insert_overwr…
Browse files Browse the repository at this point in the history
…ite (#43)
  • Loading branch information
Dandandan authored Nov 24, 2021
1 parent 0264f26 commit 9baa80c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbt/include/athena/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 9baa80c

Please sign in to comment.