dbt Analytics Engineering Certification Practice Test – 19 Free Exam Questions with Answers

dbt Analytics Engineering Certification

19 questions · instant answer feedback · concise explanations · free

  1. Question 1 of 19In a dbt unit test, what does the given block specify?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. The mock input data that replaces the actual ref() and source() inputs during testing

    The given block defines mock data that replaces actual ref and source inputs for isolated testing. The expect block is the main distractor, but it defines the expected output rows rather than the inputs.

  2. Question 2 of 19What dbt artifact is primarily used for state comparison when running Slim CI?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. manifest.json

    The manifest file provides a complete project representation needed for state comparison. Run results are the main distractor, but they only contain execution outcomes rather than the full project structure required for diffing.

  3. Question 3 of 19A developer wants to test changes to fct_reviews locally without building all 15 upstream models from scratch. Their company stores production artifacts in S3, which have been downloaded to ./prod-artifacts/. Which command allows fct_reviews to reference production-built upstream tables instead of rebuilding them locally?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. dbt run –select fct_reviews –defer –state ./prod-artifacts

    Combining defer with the state flag resolves upstream refs to production objects defined in the artifacts. Option D is a strong distractor, but the plus symbol forces local builds of those upstream models.

  4. Question 4 of 19What is an exposure in dbt?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. A YAML declaration of a downstream consumer of dbt models, such as a dashboard or ML model

    Exposures are yaml declarations defining downstream consumers of your models, like dashboards. The main distractor refers to public models, which is a project governance feature rather than a lineage documentation tool.

  5. Question 5 of 19Which of the following best describes a macro in dbt?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. A reusable Jinja code block defined in the macros/ directory, callable from models, tests, or other macros

    Macros are reusable Jinja code blocks defined in the macros directory that accept arguments and can be called from models or tests. Do not confuse them with stored procedures; macros compile into your SQL rather than existing in the warehouse.

  6. Question 6 of 19What are the three possible values for the access config on a dbt model?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. private, protected, public

    The three access levels are private, protected, and public. Protected is the default, allowing references within the same project. Public allows cross-project references, while private restricts access exclusively to models in the same group.

  7. Question 7 of 19What type of error does dbt report when the Jinja compiles successfully but the database rejects the resulting SQL?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Database Error

    A Database Error occurs when Jinja compilation succeeds but the warehouse rejects the SQL. Use this to distinguish from Compilation Errors, which happen locally when Jinja fails to render before hitting the warehouse.

  8. Question 8 of 19What is the difference between the target/compiled/ and target/run/ directories?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. compiled/ contains the pure SELECT with Jinja resolved; run/ contains the full DDL-wrapped SQL sent to the database

    The compiled directory contains pure SELECT statements with Jinja resolved, useful for debugging. The run directory contains the full wrapped SQL sent to the warehouse, including DDL commands like create table, representing actual execution.

  9. Question 9 of 19Which cron expression schedules a job to run every weekday (Monday through Friday) at 6:00 AM UTC?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. 0 6 * * 1-5

    The cron expression 0 6 star star 1-5 means minute zero, hour six, and days Monday through Friday. Remember the five field order for scheduling deployments in dbt Cloud jobs.

  10. Question 10 of 19What does the –defer flag do in a Slim CI pipeline?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. It tells dbt to use production database objects for any ref() not being built in the current run

    The defer flag resolves ref calls for unselected models to their production objects. Skipping unchanged models is the main distractor, but that behavior is handled by the state modified selector.

  11. Question 11 of 19A production run resulted in 30 models succeeding, 1 failing (fct_reviews), and 15 being skipped. You run: dbt retry How many models will dbt attempt to build?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. The 1 failed model and the 15 skipped models (16 total), excluding the 30 successes

    The retry command re-executes any nodes that did not succeed, including both failed and skipped models. The main distractor is option B, which incorrectly assumes skipped models are ignored.

  12. Question 12 of 19Which statement about env_var() and var() is correct?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. env_var() reads system environment variables and works in dbt_project.yml; var() reads from vars and only works in Jinja

    The env_var function reads system environment variables and works in dbt_project.yml and profiles.yml. Remember that var reads project variables but is restricted to Jinja contexts, unlike env_var which can securely configure environments outside of models.

  13. Question 13 of 19What is the purpose of groups in dbt?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. To assign models to a logical grouping that restricts cross-group references based on the access config

    Groups organize models into logical collections, often representing team ownership or business domains. Combined with the access config, groups restrict cross-group references, preventing private models from being referenced outside their group.

  14. Question 14 of 19After running dbt run, you see:Compilation Error in model src_listings (models/src/src_listings.sql) 'listings' is undefined.This can happen when you try to reference a source or model that does not exist, or when you use an undefined variable.The model SQL contains:WITH raw_listings AS ( SELECT * FROM {{ source('airbnb', listings) }} ) SELECT id AS listing_id, name AS listing_name FROM raw_listingsWhat is the root cause?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. The table name listings is missing quotes — it should be {{ source('airbnb', 'listings') }} with both arguments quoted

    The table name lacks quotes, causing Jinja to evaluate it as an undefined variable. Always pass string literals to functions like source, wrapping arguments in quotes to prevent compilation errors during execution.

  15. Question 15 of 19What is the purpose of dbt build compared to running dbt run and dbt test separately?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. dbt build runs models and tests in DAG order, testing each model immediately after it is built

    The build command executes nodes in DAG order, interleaving models and tests so tests run immediately after their dependencies. It prevents downstream execution if tests fail, unlike running sequentially without fail-fast behavior.

  16. Question 16 of 19How can you configure a test to issue a warning instead of causing a build failure?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Set severity: warn on the test configuration

    Setting severity to warn allows the test to fail without returning a failure exit code. The run-level warn-only flag is a distractor because it applies globally to all tests rather than configuring a single test.

  17. Question 17 of 19You want to run ONLY the unit tests in your dbt project, without running any data tests (such as not_null or unique). Which command achieves this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. dbt test –select test_type:unit

    The test_type:unit selector filters the dbt test command to execute only unit tests. Remember that dbt unit tests are integrated into the standard test command rather than having a dedicated standalone command.

  18. Question 18 of 19A developer wants to build all models that feed into the executive dashboard. They run: dbt build –select +exposure:executive_dashboard Looking at the lineage graph above, which models are built by this command?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Every upstream model: dim_listings_w_hosts, mart_fullmoon_reviews, and their ancestors

    The plus prefix traverses the entire upstream dependency graph to build all ancestors. Option A is a strong distractor, but it only selects the direct parents and misses the indirect upstream dependencies.

  19. Question 19 of 19Given this staging model configured as ephemeral in dbt_project.yml:WITH raw_listings AS ( SELECT * FROM {{ source('airbnb', 'listings') }} ) SELECT id AS listing_id, listing_url, name AS listing_name, room_type, minimum_nights, host_id, price AS price_str, created_at, updated_at FROM raw_listingsWhat happens when a downstream model references {{ ref('src_listings') }}?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. No warehouse object is created — dbt injects the model's SQL as a CTE into the downstream model at compile time

    Ephemeral models do not create physical tables or views in the warehouse. Instead, dbt compiles the model code into a Common Table Expression within downstream models. Use this materialization to avoid cluttering your schema with staging tables.

More free practice tests at certpunch.com and new video rounds on @CertPunch.

Scroll to Top