diff --git a/CHANGELOG.md b/CHANGELOG.md index 015f7d7f0..d32d14f9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixes - Fix copy into macro when passing `expression_list`. ([#223](https://github.com/databricks/dbt-databricks/pull/223)) +- Partially revert to fix the case where schema config contains uppercase letters. ([#224](https://github.com/databricks/dbt-databricks/pull/224)) ## dbt-databricks 1.3.1 (November 1, 2022) diff --git a/dbt/adapters/databricks/impl.py b/dbt/adapters/databricks/impl.py index 79426e537..62affa9ca 100644 --- a/dbt/adapters/databricks/impl.py +++ b/dbt/adapters/databricks/impl.py @@ -131,13 +131,15 @@ def list_relations_without_caching( # type: ignore[override] f'Invalid value from "show table extended ...", ' f"got {len(row)} values, expected 4" ) - _, name, _, information = row + _schema, name, _, information = row rel_type = RelationType.View if "Type: VIEW" in information else RelationType.Table is_delta = "Provider: delta" in information is_hudi = "Provider: hudi" in information relation = self.Relation.create( database=schema_relation.database, - schema=schema_relation.schema, + # Use `_schema` retrieved from the cluster to avoid mismatched case + # between the profile and the cluster. + schema=_schema, identifier=name, type=rel_type, information=information,