# Migrating away from dbt-utils' not\_null\_where and unique\_where tests

**URL:** <https://discourse.getdbt.com/t/migrating-away-from-dbt-utils-not-null-where-and-unique-where-tests/2773>\
**Category:** Archive\
**Created:** [July 16, 2021, 10:01am UTC](https://discourse.getdbt.com/t/migrating-away-from-dbt-utils-not-null-where-and-unique-where-tests/2773 "2021-07-16T10:01:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [July 16, 2021, 10:01am UTC](https://discourse.getdbt.com/t/migrating-away-from-dbt-utils-not-null-where-and-unique-where-tests/2773/1 "2021-07-16T10:01:03Z")

</div>

If you’ve upgraded to dbt 0.20.0, you might start seeing a wall of deprecation warnings from dbt-utils:

`dbt_utils.not_null_where is no longer supported. Starting in dbt v0.20.0, the built-in not_null test supports a where config.`  
`dbt_utils.unique_where is no longer supported. Starting in dbt v0.20.0, the built-in unique test supports a where config.`

> ****
>
> Truly, a wall.
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/40dfc6944ed64d8606b8fc26de5b763ee93871df.png)

As the warning says, all tests now get a [where configuration for free](https://docs.getdbt.com/reference/resource-configs/where) 🥳. Migrating to the new method is a simple find-and-replace away (with some regex if you want to be fancy).

In your editor of choice, find **`dbt_utils\.(unique|not_null)_where`** and replace it with **`$1`,** which is the first capture group (the stuff in brackets).

 ![image](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/c2cfdb9a99ecb4619023bb890c93885a1ffc1ea9.png)

[Regex not your thing](https://xkcd.com/1171/)? You’ll have to do it in two parts, replacing `dbt_utils.unique_where` and `dbt_utils.not_null_where` with `unique` and `not_null` respectively.
