dbt-project-evaluator icon indicating copy to clipboard operation
dbt-project-evaluator copied to clipboard

Incorporate not null constraint into primary key rule

Open katieclaiborne7 opened this issue 1 month ago • 2 comments

This is a:

  • [ ] bug fix PR with no breaking changes
  • [x] new functionality

Link to Issue

Closes #373

Description & motivation

These changes add a third default method of defining a model's primary key: a not null constraint and unique test applied to the same column.

Expanding the default primary key definitions will enable teams to leverage constraints without duplicating existing tests or sacrificing test coverage.

Integration Test Screenshot

image

Checklist

  • [x] I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)
    • [x] BigQuery
    • [ ] Postgres
    • [ ] Redshift
    • [ ] Snowflake
    • [ ] Databricks
    • [ ] DuckDB
    • [ ] Trino/Starburst
  • [ ] I have updated the README.md (if applicable)
  • [ ] I have added tests & descriptions to my models (and macros if applicable)

katieclaiborne7 avatar May 10 '24 13:05 katieclaiborne7