Closed MichelleArk closed 1 year ago
Core issue: https://github.com/dbt-labs/dbt-core/issues/6754
from https://github.com/dbt-labs/dbt-core/issues/7067:
Spark only supports check constraints at the table-level. Add check constraints set at the model-level after check constraints from columns are added: https://github.com/dbt-labs/dbt-spark/blob/main/dbt/include/spark/macros/adapters.sql#L200
check
Testing coverage is tricky here because the alter statements run after the create table statement: https://github.com/dbt-labs/dbt-spark/blob/main/tests/functional/adapter/test_constraints.py#L8
Constraint docs: https://docs.delta.io/latest/delta-constraints.html
Core issue: https://github.com/dbt-labs/dbt-core/issues/6754
from https://github.com/dbt-labs/dbt-core/issues/7067:
Spark only supports
check
constraints at the table-level. Add check constraints set at the model-level after check constraints from columns are added: https://github.com/dbt-labs/dbt-spark/blob/main/dbt/include/spark/macros/adapters.sql#L200Testing coverage is tricky here because the alter statements run after the create table statement: https://github.com/dbt-labs/dbt-spark/blob/main/tests/functional/adapter/test_constraints.py#L8
Constraint docs: https://docs.delta.io/latest/delta-constraints.html