Skip to content

Commit

Permalink
Setting _schema rather than replacing it
Browse files Browse the repository at this point in the history
[CT-276] Apache Iceberg Support dbt-labs#294

The _schema variable was used for non-iceberg tables but was being
overridden by work for iceberg v2 tables.  I've made it so the iceberg
condition will set _schema rather than blanket changing the schema for
all providers.
  • Loading branch information
dparent1 committed Aug 19, 2022
1 parent 35bc12e commit 6f96705
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbt/adapters/spark/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ def list_relations_without_caching(
if try_show_tables:
_, name, _ = row
information = self.use_show_tables(name)
_schema = schema_relation.schema
else:
_schema, name, _, information = row
is_delta = "Provider: delta" in information
Expand All @@ -194,7 +195,7 @@ def list_relations_without_caching(
rel_type = RelationType.View if "Type: VIEW" in information else RelationType.Table

relation = self.Relation.create(
schema=schema_relation.schema,
schema=_schema,
identifier=name,
type=rel_type,
information=information,
Expand Down

0 comments on commit 6f96705

Please sign in to comment.