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 authored and cccs-jc committed Nov 19, 2022
1 parent 9d88e83 commit 3d6d5bd
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 @@ -187,6 +187,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 @@ -195,7 +196,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 3d6d5bd

Please sign in to comment.