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

Adding missing 1.9 Snapshot behavior #904

Merged
merged 3 commits into from
Jan 17, 2025
Merged

Adding missing 1.9 Snapshot behavior #904

merged 3 commits into from
Jan 17, 2025

Conversation

benc-db
Copy link
Collaborator

@benc-db benc-db commented Jan 17, 2025

Resolves #901 #902

Description

Apparently a late addition to the 1.9 (or at least late for adapter implementors to find out about) was a bunch of new snapshot behavior. Unfortunately the validation tests were not at all aligned with Databricks limitations, so had to bring in a bunch of code and tailor it, rather than just import the tests like we do ideally. This should allow the list of unique column behavior and the hard delete strategy. Note: most of the materialization is lifted as is from dbt-adapters default implementation, but keeping some Databricks specializations (like having to apply check constraints later). This materialization will be getting a face lift in 1.10.x, along with the other materializations, so I wanted to minimize the special effort required now.

TL;DR, the test code is quite ugly because it is copy-pasta and I'm trying to unblock this behavior quickly.

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 67bf98d into main Jan 17, 2025
6 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.9 snapshots and list of unique columns error
2 participants