Data tests are select queries that must return zero failing rows
Guide to asserting uniqueness, non-null, relationships, and custom logic on dbt models and related resources.
Data tests are assertions about models and other project resources; dbt test reports pass or fail for each. Built-in checks cover non-null, unique, referential correspondence, and accepted values, and any select that returns failing records can become a test. Generic tests are defined with test blocks; zero failing rows means pass. The tests key remains an alias for data_tests.
Based on: Add data tests to your DAG | dbt Developer Hub · dbt Labs