Snowflake-Labs / dbt_constraints

This package generates database constraints based on the tests in a dbt project
Apache License 2.0
139 stars 27 forks source link

Feature request: add constraints to seeds #37

Closed sfc-gh-cwiese closed 1 year ago

sfc-gh-cwiese commented 1 year ago

As a developer, I would like dbt_constraints to add constraints for my tests on seeds, so that I can benefit from join elimination in queries on my seed tables.

kenho811 commented 1 year ago

Hi,

I have a similar request.

  dbt_constraints_seeds_enabled: true

The above configuration does not seem to work.

sfc-gh-dflippo commented 1 year ago

@kenho811 , I am checking in the code now but it won't actually require a new parameter to enable. I have that parameter for sources because they are more likely to be created by an external process and we are more likely to not have privileges to modify sources. Because a seed is created from your own project, I can assume you have privileges to add constraints to them, just like I do for models and snapshots.