Recall & Review
beginner
What is the purpose of the
dbt test command?The
dbt test command runs tests defined in your dbt project to check data quality and integrity in your models.Click to reveal answer
beginner
Name two types of tests you can run with
dbt test.You can run schema tests (like uniqueness, not null) and data tests (custom SQL queries that return zero rows if data is correct).
Click to reveal answer
intermediate
How do you define a schema test in dbt?
Schema tests are defined in your model's YAML file under the
tests key, specifying tests like unique or not_null on columns.Click to reveal answer
beginner
What does it mean if
dbt test returns failures?It means some data did not pass the tests, indicating possible data quality issues that need investigation.
Click to reveal answer
intermediate
Can you run tests on specific models with
dbt test? How?Yes, by using the
--select flag with model names or tags, e.g., dbt test --select my_model runs tests only on that model.Click to reveal answer
What command runs all tests in a dbt project?
✗ Incorrect
dbt test runs all tests defined in the project to check data quality.Which of these is NOT a built-in schema test in dbt?
✗ Incorrect
greater_than is not a built-in schema test; built-in tests include unique, not_null, and accepted_values.What does a data test in dbt return if the data passes the test?
✗ Incorrect
Data tests return zero rows if the data passes, meaning no errors found.
How do you run tests only on a specific model named 'sales'?
✗ Incorrect
Use
dbt test --select sales to run tests only on the 'sales' model.If
dbt test finds failing tests, what should you do next?✗ Incorrect
Failing tests indicate data problems; you should investigate and fix the data.
Explain how to define and run a schema test in dbt.
Think about where you write tests and how you execute them.
You got /3 concepts.
Describe the difference between schema tests and data tests in dbt.
One tests structure, the other tests content.
You got /3 concepts.