fix: warn on contract.enforced=true for materialized_view#1421
Merged
Conversation
7bcdd83 to
590de2b
Compare
590de2b to
16bb7c8
Compare
Upstream dbt does not support contracts on materialized views (https://docs.getdbt.com/docs/mesh/govern/model-contracts). dbt-databricks was silently accepting the flag, hiding yml/SQL drift. Now emits a warning pointing at the dbt docs. Strictly additive; existing build outcomes and constraint behavior are unchanged. Co-authored-by: Isaac
16bb7c8 to
5b7bae6
Compare
3 tasks
tejassp-db
reviewed
Apr 24, 2026
Reword to call out dbt's official "not supported" stance and dbt-databricks' best-effort behavior that may change without notice. Drops the implication that we do nothing — we partially honor it. Co-authored-by: Isaac
sd-db
added a commit
that referenced
this pull request
Apr 27, 2026
…1422) Makes the unit vs functional test split explicit in AGENTS.md. The current section distinguishes the two by where they live and how they run, but the rule for *what each type should assert* was conveyed only through examples. A contributor could reasonably put specific-warning or compiled-SQL assertions in a functional test without tripping any review signal (surfaced in #1421 review). Adds two short paragraphs: the principle (functional = outcomes, unit = specifics) and a note that trivial macro additions do not need a test. ### Checklist - [x] I have run this code in development and it appears to resolve the stated issue - [x] 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. > Docs-only change; CHANGELOG entry intentionally omitted.
tejassp-db
approved these changes
May 4, 2026
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.
Resolves #1279
Upstream dbt does not support contracts on materialized views (docs). dbt-databricks was silently accepting
contract.enforced: true, hiding yml/SQL drift. This PR emits a warning pointing at the dbt docs. Strictly additive; no existing build outcome changes.Checklist
CHANGELOG.md