-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Athena temp tables cleaning (#714)
* - Added has_temp_table_support redefinition for Athena adapter - Added clean_up_tables to handle_tests_results and clean_elementary_test_tables to delete files from S3 * - Fix handle_tests_resuls data_monitoring_metrics cleaning up operation * Typo fix * Added adapter specific implementation for clean_up_tables and fully_drop_relation * Fixed handle_tests_results * Bugfix --------- Co-authored-by: Itamar Hartstein <[email protected]>
- Loading branch information
Showing
5 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% macro clean_up_tables(relations) %} | ||
{{ return(adapter.dispatch('clean_up_tables', 'elementary')(relations)) }} | ||
{% endmacro %} | ||
|
||
{% macro default__clean_up_tables(relations) %} | ||
{# Default implementation does nothing #} | ||
{% endmacro %} | ||
|
||
{% macro athena__clean_up_tables(relations) %} | ||
{% for relation in relations %} | ||
{% do adapter.clean_up_table(relation) %} | ||
{% endfor %} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% macro fully_drop_relation(relation) %} | ||
{{ return(adapter.dispatch('fully_drop_relation', 'elementary')(relation)) }} | ||
{% endmacro %} | ||
|
||
{% macro default__fully_drop_relation(relation) %} | ||
{% do adapter.drop_relation(relation) %} | ||
{% endmacro %} | ||
|
||
{% macro athena__fully_drop_relation(relation) %} | ||
{% do adapter.clean_up_table(relation) %} | ||
{% do adapter.drop_relation(relation) %} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters