Skip to content

Conversation

@ericj-db
Copy link
Collaborator

Resolves #

Description

There is a bug in TblPropertiesProcessor that is assuming that all tables with iceberg format need UniForm properties to be set. When managed iceberg behavior flag is enabled, this causes the materialization to fail

The fix is to only apply these properties when working with a UniForm table. Unfortunately, we cannot use the file_format to distinguish because we do not actually require the user to set file_format to parquet for managed iceberg. We infer it in the adapter based on the table_format and behavior flag. To work around this fact, I am setting model.config.extra["_databricks_use_managed_iceberg"] to pass the information to the config processor

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.

# processors can use it. This is needed by TblPropertiesProcessor to determine
# if we should add UniForm properties
if "_databricks_use_managed_iceberg" not in model.config.extra:
model.config.extra["_databricks_use_managed_iceberg"] = bool(
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be a constant if you're going to use this key multiple places. I also wonder if we should just store this in GlobalState since it will be true for the entire session, and then we won't need to stuff it on the model config.

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.

3 participants