From eedf5d17817a8fbc6bfe27de6b5968cf23025838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=20Anast=C3=A1cio?= Date: Mon, 8 Jul 2024 11:47:30 -0300 Subject: [PATCH] Fix trino temp tables cleanup --- macros/edr/tests/test_utils/clean_up_tables.sql | 8 +++++++- macros/utils/table_operations/fully_drop_relation.sql | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/macros/edr/tests/test_utils/clean_up_tables.sql b/macros/edr/tests/test_utils/clean_up_tables.sql index 5e7c0eb61..8e8887376 100644 --- a/macros/edr/tests/test_utils/clean_up_tables.sql +++ b/macros/edr/tests/test_utils/clean_up_tables.sql @@ -10,4 +10,10 @@ {% for relation in relations %} {% do adapter.clean_up_table(relation) %} {% endfor %} -{% endmacro %} \ No newline at end of file +{% endmacro %} + +{% macro trino__clean_up_tables(relations) %} + {% for relation in relations %} + {% do adapter.clean_up_table(relation) %} + {% endfor %} +{% endmacro %} diff --git a/macros/utils/table_operations/fully_drop_relation.sql b/macros/utils/table_operations/fully_drop_relation.sql index 48e835d62..54038ec0e 100644 --- a/macros/utils/table_operations/fully_drop_relation.sql +++ b/macros/utils/table_operations/fully_drop_relation.sql @@ -9,4 +9,9 @@ {% macro athena__fully_drop_relation(relation) %} {% do adapter.clean_up_table(relation) %} {% do adapter.drop_relation(relation) %} -{% endmacro %} \ No newline at end of file +{% endmacro %} + +{% macro trino__fully_drop_relation(relation) %} + {% do adapter.clean_up_table(relation) %} + {% do adapter.drop_relation(relation) %} +{% endmacro %}