From 7ec014f00374f87b1a1bc759e014df8b27369de7 Mon Sep 17 00:00:00 2001 From: Ben Cassell <98852248+benc-db@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:10:37 -0700 Subject: [PATCH] Fix #712: missing catalog in one place (#714) --- CHANGELOG.md | 6 +++++- dbt/include/databricks/macros/adapters/metadata.sql | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80421fa29..1eec47173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## dbt-databricks Next (TBD) +## dbt-databricks 1.8.3 (June 25, 2024) + +### Fixes + +- Fix missing catalog name in one of the metadata gathering calls ([714](https://github.com/databricks/dbt-databricks/pull/714)) ## dbt-databricks 1.8.2 (June 24, 2024) diff --git a/dbt/include/databricks/macros/adapters/metadata.sql b/dbt/include/databricks/macros/adapters/metadata.sql index 45b567c3c..996260f19 100644 --- a/dbt/include/databricks/macros/adapters/metadata.sql +++ b/dbt/include/databricks/macros/adapters/metadata.sql @@ -95,7 +95,8 @@ lower(data_source_format) as file_format, table_owner from `system`.`information_schema`.`tables` - where table_schema = '{{ relation.schema }}' + where table_catalog = '{{ relation.database }}' + and table_schema = '{{ relation.schema }}' {% if relation.identifier %} and table_name = '{{ relation.identifier }}' {% endif %}