Model๏ƒ

Inheritance diagram of dbt_contracts.contracts.terms.model.HasConstraints

Classes

HasConstraints(*[,ย min_count,ย max_count])

Check whether models have an appropriate number of constraints configured in their properties.

class dbt_contracts.contracts.terms.model.HasConstraints(*, min_count: Annotated[int, Ge(ge=1)] = 1, max_count: Annotated[int | None, Gt(gt=0)] = None)๏ƒ

Bases: NodeContractTerm, RangeMatcher

Check whether models have an appropriate number of constraints configured in their properties.

run(item: ItemT, context: ContractContext, parent: ParentT = None) → bool๏ƒ

Validate the context before running the term.