From 6a2c8abb3b0938c833fe29373e0aa374ea546ada Mon Sep 17 00:00:00 2001 From: Ben Cassell Date: Tue, 17 Sep 2024 09:15:21 -0700 Subject: [PATCH 1/2] handle external shallow clone --- dbt/include/databricks/macros/adapters/metadata.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/databricks/macros/adapters/metadata.sql b/dbt/include/databricks/macros/adapters/metadata.sql index 1866e0cc..fd79a58c 100644 --- a/dbt/include/databricks/macros/adapters/metadata.sql +++ b/dbt/include/databricks/macros/adapters/metadata.sql @@ -91,7 +91,7 @@ {% call statement('get_uc_tables', fetch_result=True) -%} select table_name, - if(table_type in ('EXTERNAL', 'MANAGED', 'MANAGED_SHALLOW_CLONE'), 'table', lower(table_type)) as table_type, + if(table_type in ('EXTERNAL', 'MANAGED', 'MANAGED_SHALLOW_CLONE', 'EXTERNAL_SHALLOW_CLONE'), 'table', lower(table_type)) as table_type, lower(data_source_format) as file_format, table_owner from `system`.`information_schema`.`tables` From 9af481b7b83aaf2abfb9b27a0bcb7303a0feb219 Mon Sep 17 00:00:00 2001 From: Ben Cassell Date: Tue, 17 Sep 2024 09:18:11 -0700 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e94fe3bf..c0d6f656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Update tblproperties on incremental runs. Note: only adds/edits. Deletes are too risky/complex for now ([765](https://github.com/databricks/dbt-databricks/pull/765)) - Update default scope/redirect Url for OAuth U2M, so with default OAuth app user can run python models ([776](https://github.com/databricks/dbt-databricks/pull/776)) - Fix foreign key constraints by switching from `parent` to `to` and `parent_columns` to `to_columns` ([789](https://github.com/databricks/dbt-databricks/pull/789)) +- Now handles external shallow clones without blowing up ([795](https://github.com/databricks/dbt-databricks/pull/795)) ## dbt-databricks 1.8.5 (August 6, 2024)