Skip to content

Commit

Permalink
Remove not null where and unique where (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
joellabes authored Sep 19, 2022
1 parent 4fecf2e commit 59bc852
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 89 deletions.
41 changes: 0 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Check [dbt Hub](https://hub.getdbt.com/dbt-labs/dbt_utils/latest/) for the lates
- [not_constant](#not_constant-source)
- [not_empty_string](#not_empty_string-source)
- [cardinality_equality](#cardinality_equality-source)
- [unique_where](#unique_where-source)
- [not_null_where](#not_null_where-source)
- [not_null_proportion](#not_null_proportion-source)
- [not_accepted_values](#not_accepted_values-source)
- [relationships_where](#relationships_where-source)
Expand Down Expand Up @@ -300,45 +298,6 @@ models:
to: ref('other_model_name')
```

#### unique_where ([source](macros/generic_tests/test_unique_where.sql))

Asserts that there are no duplicate values present in a field for a subset of rows by specifying a `where` clause.

*Warning*: This test is no longer supported. Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config. [See the dbt docs for more details](https://docs.getdbt.com/reference/resource-configs/where).

**Usage:**

```yaml
version: 2
models:
- name: my_model
columns:
- name: id
tests:
- dbt_utils.unique_where:
where: "_deleted = false"
```

#### not_null_where ([source](macros/generic_tests/test_not_null_where.sql))

Asserts that there are no null values present in a column for a subset of rows by specifying a `where` clause.

*Warning*: This test is no longer supported. Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config. [See the dbt docs for more details](https://docs.getdbt.com/reference/resource-configs/where).

**Usage:**

```yaml
version: 2
models:
- name: my_model
columns:
- name: id
tests:
- dbt_utils.not_null_where:
where: "_deleted = false"
```

#### not_null_proportion ([source](macros/generic_tests/not_null_proportion.sql))

Expand Down

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions integration_tests/models/generic_tests/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,6 @@ seeds:
field: is_active
to: ref('data_people')

- name: data_test_unique_where
columns:
- name: id
tests:
- dbt_utils.unique_where:
where: "_deleted = false"

- name: data_test_not_null_where
columns:
- name: id
tests:
- dbt_utils.not_null_where:
where: "_deleted = false"

- name: data_test_not_accepted_values
columns:
- name: city
Expand Down
12 changes: 0 additions & 12 deletions macros/generic_tests/test_not_null_where.sql

This file was deleted.

12 changes: 0 additions & 12 deletions macros/generic_tests/test_unique_where.sql

This file was deleted.

0 comments on commit 59bc852

Please sign in to comment.