[CT-2402] [Feature] Improve warnings/errors for constraints <> materialization types #7335
Labels
enhancement
New feature or request
model_contracts
multi_project
paper_cut
A small change that impacts lots of users in their day-to-day
Milestone
Views
If your model is materialized as a
view
and hasconstraints
defined, those constraints are not supported & will be ignored, on ALL data platforms. We should raise a warning saying this, similar to thewarn_unsupported
functionality added in #7250.Update: This might require calling a different macro within
create_view_as
, since all constraint parsing/rendering is currently happening withincreate_table_as
→get_table_columns_and_constraints
.Ephemeral models
Let's just update the language here: "constraint validation" → "contract enforcement"
dbt-core/core/dbt/parser/schemas.py
Lines 969 to 988 in 87e25e8
The text was updated successfully, but these errors were encountered: