Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing schema in catalog for delta tables #589

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20230112-193406.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: fix missing schema in catalog for delta tables
time: 2023-01-12T19:34:06.197611+02:00
custom:
Author: hanna-liashchuk
Issue: "368"
PR: "589"
5 changes: 4 additions & 1 deletion dbt/adapters/spark/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ def parse_columns_from_information(self, relation: BaseRelation) -> List[SparkCo
return columns

def _get_columns_for_catalog(self, relation: BaseRelation) -> Iterable[Dict[str, Any]]:
columns = self.parse_columns_from_information(relation)
if relation.is_delta:
columns = self.get_columns_in_relation(relation)
else:
columns = self.parse_columns_from_information(relation)

for column in columns:
# convert SparkColumns into catalog dicts
Expand Down
Loading