[CT-2441] [Feature] Support expression
for all constraint types
#7416
Labels
enhancement
New feature or request
model_contracts
Team:Adapters
Issues designated for the adapter area of the code
user docs
[docs.getdbt.com] Needs better documentation
Milestone
For model-level and column-level constraints, only
check
andcustom
constraints will include theexpression
field in their templated DDL.I think all constraints should support the custom
expression
field. This is:UNIQUE NULLS NOT DISTINCT
instead ofUNIQUE
, the user could configure withexpression: nulls not distinct
foreign key
/references
constraints — although the user can't really do things like stickref
in here, since we kicked that out of scope (rationale: [CT-1922] Support 'constraints' as a model-level property #6754 (comment)), so I wouldn't consider these constraints high-priorityThis is on me - I didn't do a good job of making this clear in the revised spec (#7066)! The words I used were
free for all
, which really had two meanings:I'm opening this issue to track the gap, but the more I write, the less I feel this is something we need to go do right away.
type: custom
constraint, which is just a free text entry.Relevant methods:
dbt-core/core/dbt/adapters/base/impl.py
Line 1327 in ada8860
dbt-core/core/dbt/adapters/base/impl.py
Line 1384 in ada8860
The text was updated successfully, but these errors were encountered: