fix: refresh materialized_view when databricks_tags is set (#1419)#1424
Open
fix: refresh materialized_view when databricks_tags is set (#1419)#1424
Conversation
MaterializedViewAPI._describe_relation was missing the information_schema.tags fetch that ViewAPI and IncrementalTableAPI both perform. Existing MV tags therefore always parsed as empty, causing get_changeset to report a spurious tag diff for any model declaring databricks_tags. The non-None changeset short-circuited the refresh branch in the materialized_view materialization macro, routing it to ALTER ... SET TAGS instead of REFRESH MATERIALIZED VIEW. MV data went silently stale while dbt reported success. Adds the missing fetch_tags call and a TDD-style functional test plus a unit regression guard.
81f0018 to
00cd608
Compare
Collaborator
Author
|
/integration-test |
|
Integration tests dispatched for PR #1424 by @sd-db. Track progress in the Actions tab. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
|
Integration results for PR #1424 — UC cluster ❌ failure · SQL warehouse ✅ success · All-purpose cluster ✅ success |
|
Integration results for PR #1424 — UC cluster ✅ success · SQL warehouse ✅ success · All-purpose cluster ✅ success |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1419. MVs configured with
databricks_tagswere silently going stale ondbt run— onlyALTER ... SET TAGSwas issued, neverREFRESH MATERIALIZED VIEW.MaterializedViewAPI._describe_relationwas the only*API._describe_relationnot fetchinginformation_schema.tags, so existing tags always parsed as{}. Any model withdatabricks_tagsproduced a spurious tag diff that routed the build to the alter path instead of refresh. One-line fix mirroringViewAPI/IncrementalTableAPI.Test plan