[Feature] Raise a clearer error message for resource types that don't support enforcing contracts #9607
Labels
enhancement
New feature or request
model_contracts
snapshots
Issues related to dbt's snapshot functionality
Is this a new bug in dbt-core?
Current Behavior
#9542 describes the current behavior, namely:
dbt should raise a descriptive error message if a user adds a model contract to any of the following:
ephemeral
-materialized SQL models.sources
,seeds
,snapshots
, and so on.Put another way, dbt should raise an error for model contracts that don't have all of the following properties:
resource_type == "model"
language == "sql"
materialized in ("incremental", "table", "view", "materialized_view")
Expected Behavior
#9542 (comment) describes the desired behavior.
Steps To Reproduce
See "current behavior" above.
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: