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

Support tblproperties (weakly) in python models #633

Merged
merged 3 commits into from
Apr 8, 2024
Merged

Conversation

benc-db
Copy link
Collaborator

@benc-db benc-db commented Apr 4, 2024

Description

It was an oversight that python models did not support specifying tblproperties in any way. This remedies that, but with a major caveat: because DataframeWriterV1 doesn't support tableProperty (and DataframeWriterV2 does not currently work in the execution env), we can't set tblproperties at table creation. Or more aptly, we might be able to, but it would be a significant rewrite, where we create a table (including specifying column types, ugh) and the insert the data into it as separate steps, so that we could get tblproperties set using the SQL API.

What does that mean? It means that if you want to use tblproperties to anotate your python-generated tables with metadata, you'll now be able to. If, however, you were hoping to use tblproperties on python models to enable some advanced Databricks feature at table creation time, this change will probably not help you.

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.

@benc-db benc-db merged commit a1406c3 into main Apr 8, 2024
21 checks passed
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