Skip to content

Commit

Permalink
explicitly like *
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Nov 9, 2023
1 parent 52aa61d commit c12d663
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dbt/adapters/databricks/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c12d663

Please sign in to comment.