Built-In Assertions
PipeRider's built-in set of data assertions with usage examples
Here are built-in assertions, there are two types of assertions, one takes no parameter, the other takes parameters.
- Description: Assert the column value should be in the range.
- Assert:
gte
: the value should be greater than or equal togt
: the value should be greater thanlte
: the value should be less than or equal tolt
: the value should be less thanin
: the value should belong to the set
The value should be between [0,10000)
world_city:
columns:
population:
tests:
- name: assert_column_value
assert:
gte: 0
lt: 10000
The value of a datetime type column should be
>= '2022-01-01'
world_city:
columns:
create_at:
tests:
- name: assert_column_value
assert:
gte: '2022-01-01;
The value of the column should belong to ["male", "female"] set
TITANIC:
columns:
Sex:
tests:
- name: assert_column_value
assert:
in: ["male", "female"]
You can have assertions against metrics generated by PipeRider directly with several assertion expressions.
Description: Metric-based assertions are assert the value of a metric.
- Assert:
gte
: the value should be greater than or equal togt
: the value should be greater thanlte
: the value should be less than or equal tolt
: the value should be less thaneq
: the value should equal tone
: the value should not equal to
The row count should be <= 1000000
world_city:
tests:
- metric: row_count
assert:
lte: 1000000
The missing percentage should be <= 0.01
world_city:
columns:
country_code:
tests:
- metric: nulls_p
assert:
lte: 0.01
The median should be between [10, 20]
world_city:
columns:
country_code:
tests:
- metric: p50
assert:
gte: 10
lte: 20
Last modified 1mo ago