Skip to content

Commit

Permalink
add to and to_column(s) to ColumnLevelConstraint and ModelLevelConstr…
Browse files Browse the repository at this point in the history
…aint contracts (#163)

* add to and to_column(s) to ColumnLevelConstraint and ModelLevelConstraint contracts

* fix schema

* linting

* changelog entry
  • Loading branch information
MichelleArk authored Jul 16, 2024
1 parent 71f4d53 commit 8edae92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240716-102457.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Add to and to_columns to ColumnLevelConstraint and ModelLevelConstraint contracts
time: 2024-07-16T10:24:57.11251-04:00
custom:
Author: michelleark
Issue: "168"
2 changes: 2 additions & 0 deletions dbt_common/contracts/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class ColumnLevelConstraint(dbtClassMixin):
warn_unsupported: bool = (
True # Warn if constraint is not supported by the platform and won't be in DDL
)
to: Optional[str] = None
to_columns: List[str] = field(default_factory=list)


@dataclass
Expand Down

0 comments on commit 8edae92

Please sign in to comment.