-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prune old table version for incremental models (#533)
- Loading branch information
1 parent
86178a4
commit c1aa4ef
Showing
4 changed files
with
15 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{% macro athena__persist_docs(relation, model, for_relation, for_columns) -%} | ||
{% macro athena__persist_docs(relation, model, for_relation=true, for_columns=true) -%} | ||
{% set persist_relation_docs = for_relation and config.persist_relation_docs() and model.description %} | ||
{% set persist_column_docs = for_columns and config.persist_column_docs() and model.columns %} | ||
{% set skip_archive_table_version = not is_incremental() %} | ||
{% if persist_relation_docs or persist_column_docs %} | ||
{% do adapter.persist_docs_to_glue(relation, | ||
model, | ||
persist_relation_docs, | ||
persist_column_docs, | ||
skip_archive_table_version=skip_archive_table_version) %}} | ||
{% do adapter.persist_docs_to_glue( | ||
relation=relation, | ||
model=model, | ||
persist_relation_docs=persist_relation_docs, | ||
persist_column_docs=persist_column_docs, | ||
skip_archive_table_version=true | ||
) | ||
%}} | ||
{% endif %} | ||
{% 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
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