From 4b9ecc910e916112e4f9d1821a9d2e1057b427a7 Mon Sep 17 00:00:00 2001 From: nicor88 <6278547+nicor88@users.noreply.github.com> Date: Mon, 6 Nov 2023 11:40:18 +0100 Subject: [PATCH] add methods --- dbt/adapters/athena/impl.py | 4 ++++ dbt/include/athena/macros/adapters/metadata.sql | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dbt/adapters/athena/impl.py b/dbt/adapters/athena/impl.py index 29188171..72bc8231 100755 --- a/dbt/adapters/athena/impl.py +++ b/dbt/adapters/athena/impl.py @@ -662,6 +662,10 @@ def list_relations_without_caching(self, schema_relation: AthenaRelation) -> Lis return relations + @available + def get_catalog_relations(self, relations: List[AthenaRelation]) -> List[BaseRelation]: + raise NotImplementedError("get_catalog_relations is not implemented for Athena") + @available def swap_table(self, src_relation: AthenaRelation, target_relation: AthenaRelation) -> None: conn = self.connections.get_thread_connection() diff --git a/dbt/include/athena/macros/adapters/metadata.sql b/dbt/include/athena/macros/adapters/metadata.sql index 0ca7cdb8..86e67bf0 100644 --- a/dbt/include/athena/macros/adapters/metadata.sql +++ b/dbt/include/athena/macros/adapters/metadata.sql @@ -11,3 +11,7 @@ {% macro athena__list_relations_without_caching(schema_relation) %} {{ return(adapter.list_relations_without_caching(schema_relation)) }} {% endmacro %} + +{% macro athena__get_catalog_relations(information_schema, relations) %} + {{ return(adapter.get_catalog_relations(relations)) }} +{% endmacro %}