Skip to content

Commit

Permalink
Update README.md (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Dec 16, 2022
1 parent 42003d7 commit 233cc05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ An optional `quote_columns` argument (`default=false`) can also be used if a col

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

Asserts that a column's values fall inside an expected range. Any combination of `min_value` and `max_value` is allowed, and the range can be inclusive or exclusive. Provide a `where` argument to filter to specific records only.
Asserts that a column's values fall inside an expected range. Any combination of `min_value` and `max_value` is allowed, and the range can be inclusive or exclusive. Provide [a `where` argument](https://docs.getdbt.com/reference/resource-configs/where) to filter to specific records only.

In addition to comparisons to a scalar value, you can also compare to another column's values. Any data type that supports the `>` or `<` operators can be compared, so you could also run tests like checking that all order dates are in the past.

Expand Down Expand Up @@ -583,7 +583,8 @@ models:
- dbt_utils.accepted_range:
min_value: 0
inclusive: false
where: "num_orders > 0"
config:
where: "num_orders > 0"
```

----
Expand Down

0 comments on commit 233cc05

Please sign in to comment.