Filter the resource being tested (model, source, seed, or snapshot).
where condition is templated into the test query by replacing the resource reference with a subquery. For instance, a
not_null test may look like:
select *from my_modelwhere my_column is null
where config is set to
where date_column = current_date, then the test query will be updated to:
select *from (select * from my_model where date_column = current_date) my_modelwhere my_column is null
- Specific test
- One-off test
- Generic test block
- Project level
Configure a specific instance of a generic (schema) test:
version: 2models:- name: large_tablecolumns:- name: my_columntests:- accepted_values:values: ["a", "b", "c"]where: "date_column = current_date"