From c12d66328bc6abf9b52f47f9640dd3c675d20402 Mon Sep 17 00:00:00 2001 From: Ben Cassell Date: Thu, 9 Nov 2023 13:19:57 -0800 Subject: [PATCH] explicitly like * --- dbt/adapters/databricks/impl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dbt/adapters/databricks/impl.py b/dbt/adapters/databricks/impl.py index ed6e009fa..4d8990c44 100644 --- a/dbt/adapters/databricks/impl.py +++ b/dbt/adapters/databricks/impl.py @@ -256,10 +256,14 @@ def get_relations_without_caching(self, relation: DatabricksRelation) -> Table: # if there are any table types to be resolved if any(not row[3] for row in new_rows): # Get view names and create a dictionary of view name to materialization + relation_all_tables = self.Relation.create( + database=relation.database, schema=relation.schema, identifier="*" + ) + with self._catalog(relation.database): views = self.execute_macro(SHOW_VIEWS_MACRO_NAME, kwargs=kwargs) tables = self.execute_macro( - SHOW_TABLE_EXTENDED_MACRO_NAME, kwargs={"schema_relation": relation} + SHOW_TABLE_EXTENDED_MACRO_NAME, kwargs={"schema_relation": relation_all_tables} ) view_names: Dict[str, bool] = { view["viewName"]: view.get("isMaterialized", False) for view in views