You will be shown statements about where a singular data test and a generic data test are declared, and how each one is named, one at a time. For each statement, answer YES if it is true, NO if it is false.
In the exam these appear one at a time and you answer YES or NO to each, without seeing the rest. All of them, with their answers, are below.
- The name dbt gives a singular test is the name of its .sql file.YES
- dbt ships with unique, not_null, accepted_values, and relationships, so you write no SQL to use them.YES
- A singular test runs only once you list it under a data_tests key in a YAML properties file.NO
- A generic test's parametrized query is written inline in the schema.yml entry that applies it.NO
- A schema.yml entry can pass arguments to the generic test it applies.YES
WHY
A singular test has no separate declaration: you save the query that selects failing rows as a .sql file under the tests directory, and dbt takes the test's name straight from the file name — tests/assert_total_payment_amount_is_positive.sql becomes the test assert_total_payment_amount_is_positive (a). That is the whole registration step; the file's presence in test-paths is what makes it run. A generic test is the opposite arrangement: the query lives once in a test block and is pointed at a resource by name from YAML. Four of them are built in — unique, not_null, accepted_values, and relationships come with dbt, so applying them is a YAML entry and nothing else (b). Because the query in a test block is parametrized, the YAML entry is also where you feed it arguments: accepted_values takes values, relationships takes to and field (e). That naming-versus-arguments split is the practical difference — a singular test hard-codes everything in one file, a generic test takes its specifics from the entry that applies it.
WHY THE OTHERS ARE WRONG
- A singular test runs only once you list it under a data_tests key in a YAML properties file.
- This inverts how dbt finds singular tests. dbt collects them by scanning the directories in test-paths (default: tests) for .sql files — no YAML entry is involved, and a data_tests entry under a model or column is where generic tests are applied. You may optionally add a properties entry for a singular test to attach configs such as a description, but the test runs under dbt test with or without one.
- A generic test's parametrized query is written inline in the schema.yml entry that applies it.
- The parametrized query is never inline in the properties file. It lives in a test block in a .sql file — the four built-ins ship inside dbt, and a custom generic test goes in a .sql file you write. The YAML entry only names the test and supplies its arguments, which is precisely what makes one definition reusable across many models and columns.