Skip to content

fix: missing metadata handling in is_hudi and is_iceberg#1435

Open
aarushisingh04 wants to merge 2 commits intodatabricks:mainfrom
aarushisingh04:fix-relation-metadata-assert
Open

fix: missing metadata handling in is_hudi and is_iceberg#1435
aarushisingh04 wants to merge 2 commits intodatabricks:mainfrom
aarushisingh04:fix-relation-metadata-assert

Conversation

@aarushisingh04
Copy link
Copy Markdown
Contributor

description

can_be_replaced calls is_iceberg without first checking whether metadata is available. on relations that haven't fetched extended metadata yet (metadata=None) this hits an unconditional assert self.metadata is not None and crashes the dbt run with an AssertionError.

the fix

  • updates is_hudi and is_iceberg to safely return False when self.metadata is None, making their behavior consistent with other metadata properties like owner and stats.
  • unit tests have also been added to ensure properties evaluate gracefully on un-hydrated relations.

checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant