Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add to and to_column(s) to ColumnLevelConstraint and ModelLevelConstraint contracts #163

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dbt_common/contracts/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from enum import Enum
from typing import Optional, List

from dbt_common.dataclass_schema import dbtClassMixin
from dbt_common.dataclass_schema import dbtClassMixin, ValidationError


class ConstraintType(str, Enum):
Expand Down 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
Loading