dbt-project-evaluator
dbt-project-evaluator copied to clipboard
Incorporate not null constraint into primary key rule
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
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)