Table tests
Y42 comes with the following built-in table tests:
-
Expression is true: Asserts that a valid SQL expression is true for all records. This is useful for checking integrity across columns. This implements the dbt_utils.expression_is_true (opens in a new tab) test under the hood.
-
Recency: Asserts that a timestamp column in the reference model contains data that is at least as recent as the defined date interval. This implements the dbt_utils.recency (opens in a new tab) test under the hood.
-
Mutually exclusive ranges: Asserts that for a given
lower_bound_column
andupper_bound_column
, the ranges between the lower and upper bounds do not overlap with the ranges of another row. This implements the dbt_utils.mutually_exclusive_ranges (opens in a new tab) test under the hood.
Advanced tests
You can declare additional tests that go beyond the built-in tests provided, in a model's .yml
file.