Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 4 additions & 2 deletions dbt/adapters/databricks/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we comment here on why we need the schema returned from the row?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, left a comment.
Actually we might have a better way to handle this, but let me just revert to avoid the current regression.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

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,
Expand Down