dbt_constraints icon indicating copy to clipboard operation
dbt_constraints copied to clipboard

This package generates database constraints based on the tests in a dbt project

Results 13 dbt_constraints issues
Sort by recently updated
recently updated
newest added

Some of our models have `incremental` materialization. This model contains some history we want to keep, so we disabled `full_refresh` for it. We wanted to change PK column after adding...

I have a not_null test configured to only warn if the number of failures is >100. ``` name: mostly_not_null_column tests: - not_null: config: severity: warn warn_if: ">100" ``` It appears...

The macro create_constraints_by_type contains a check for, among other things, the type of materialization (table, incremental, snapshot, and seed) when determining if the table resulting from a model will have...

I'm using [datavault4dbt](https://github.com/ScalefreeCOM/datavault4dbt). Models look a little different than the standard. In my model CUST_HUB_CUSTOMER_CUST.sql I call the post-hook ``` {% set CUST_HUB_CUSTOMER_CUST = api.Relation.create(schema='dwhstage', identifier='CUST_HUB_CUSTOMER_CUST', type='table') %} {{ config({...

always_create_constraint config is working only with thresholds (warn_if and error_if) .. It is not forcing the constraint with just severity: warn. -- Not setting the FK - name: col_fk tests:...

### Description The [Please Note](https://github.com/Snowflake-Labs/dbt_constraints/tree/main#please-note) section of the dbt_constraints README.md explains that "When you add this package, dbt will automatically begin to create ... not null constraints for not_null tests."...

You can now define Foreign and Primary keys on table columns in BigQuery. Would love to see this implemented 🙏 ❤️ Google docs regarding adding FK and PK constraints. https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_add_constraint_statement...

Update to add BQ. BQ does not have a concept of unique keys. - Added in an override to create PKs. Let me know if you'd liekl to see that...

We are running into an issue when dbt_constraints is creating constraints based on the dbt_utils relationships test. It does not respect environment deferral when running in dbt 1.8 with `state:modified+`....

bug

When we want to use conditional logic for dbt_constraints_enabled var it simply doesn't work. When used the classic way, it works eg. ` vars: dbt_constraints_enabled: true (or false) ` But...