Skip to content

feat: support persist_constraints in v2 materializations - #1645

Draft
saishreeeee wants to merge 4 commits into
refactor/v1-constraints-pythonfrom
feature/unify-constraint-renderer
Draft

feat: support persist_constraints in v2 materializations#1645
saishreeeee wants to merge 4 commits into
refactor/v1-constraints-pythonfrom
feature/unify-constraint-renderer

Conversation

@saishreeeee

@saishreeeee saishreeeee commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Description

Stacked on #1653.

  • Allow v2 table creation and relation-config reconciliation to read legacy meta.constraints when persist_constraints is enabled.
  • Match v1 persist behavior by skipping unsupported constraints and generating stable names for unnamed constraints.
  • Keep contract-only constraint handling unchanged.

Testing

  • Unit tests for v2 relation-config parsing, stable naming, and string config values
  • Functional persist_constraints test on a UC SQL warehouse

@saishreeeee saishreeeee changed the title Collapse v1/v2 constraint rendering onto TypedConstraint refactor: collapse v1/v2 constraint rendering onto TypedConstraint Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  dbt/adapters/databricks/relation_configs
  constraints.py 26, 34
Project Total  

This report was generated by python-coverage-comment-action

@saishreeeee
saishreeeee force-pushed the feature/unify-constraint-renderer branch from dcc1dfb to 922cb84 Compare August 22, 2026 04:40
# Conflicts:
#	CHANGELOG.md
#	dbt/adapters/databricks/constraints.py
#	tests/unit/test_constraints.py
@saishreeeee saishreeeee changed the title refactor: collapse v1/v2 constraint rendering onto TypedConstraint feat: support persist_constraints in v2 materializations Aug 27, 2026
@saishreeeee
saishreeeee changed the base branch from 1.13.latest to refactor/v1-constraints-python August 27, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant