dbt Analytics Engineering Certification · 13% practice allocation

dbt Analytics Engineering Certification: Debugging Data Modeling Errors Practice Questions

5 free sample questions from the Debugging Data Modeling Errors domain, with answers and explanations. The full dbt Analytics Engineering Certification bank has 327 questions across 7 domains. Questions are scenario-based and written from the official dbt Labs exam guide.

1.

Running dbt debug in a new environment returns:

Could not find profile named 'jaffle_shop'

Which TWO checks are most relevant? (Select THREE.)

  • A. Run dbt deps to install the profile from the package registry
  • B. Confirm the profile: key in dbt_project.yml matches a top-level key in profiles.yml✓ Correct
  • C. Set target: dev inside dbt_project.yml so dbt knows which output to use
  • D. Verify the warehouse user has CREATE SCHEMA privileges in the target database
  • E. Check YAML indentation in profiles.yml so the profile name is a top-level mapping key and not nested under another key✓ Correct
  • F. Confirm profiles.yml exists in the expected directory (e.g., ~/.dbt/) or that --profiles-dir / DBT_PROFILES_DIR points to its location✓ Correct
Explanation

Correct (1): the profile name is the join key between the project and the credentials file; a mismatch produces exactly this message. Correct (2): if dbt cannot locate profiles.yml at all, no profile of that name is found — hence checking the directory or the --profiles-dir/DBT_PROFILES_DIR override. Correct (3): mis-indentation can bury the profile key so it is not a top-level entry, making it invisible to dbt. Option 4 is wrong: privileges are irrelevant because dbt never connected. Option 5 is wrong: profiles are never distributed as packages. Option 6 is wrong: target is set inside the profile in profiles.yml, not dbt_project.yml, and a missing target yields a different error.

2.

Which TWO statements correctly distinguish a dbt Compilation Error from a Database Error? (Select TWO.)

  • A. Database Errors are returned by the warehouse after dbt submits SQL, and the message text originates from the adapter/warehouse✓ Correct
  • B. Compilation Errors are only ever produced by dbt compile, never by dbt run
  • C. Compilation Errors are raised by dbt while parsing/rendering Jinja or resolving the DAG, before SQL is sent to the warehouse✓ Correct
  • D. Compilation Errors always indicate a missing table or view in the target schema
  • E. Database Errors can be resolved by running dbt clean and dbt deps because they stem from stale package artifacts
Explanation

Correct (1): Compilation Errors come from dbt itself — Jinja rendering failures, unresolved ref()/source(), invalid config, YAML problems — and occur before execution. Correct (2): Database Errors are pass-through messages from the warehouse (syntax errors, permission denied, type mismatch) after dbt submits the compiled SQL. Option 3 is wrong: a missing relation in the warehouse is a database error; compilation errors concern the project graph and Jinja. Option 4 is wrong: dbt clean/dbt deps address stale target/package state, which affects compilation, not warehouse-side failures. Option 5 is wrong: dbt run compiles first, so it can and does raise Compilation Errors.

3.

A model int_order_totals.sql contains:

select * from {{ ref('int_order_totals') }}

after a careless copy/paste. What will dbt report?

  • A. A dependency cycle error, because the node depends on itself and the DAG cannot be topologically sorted✓ Correct
  • B. A warning only; dbt will build the model using the previous version of the relation
  • C. A Database Error stating the relation does not exist, because the model is selecting from itself before it is built
  • D. Nothing — dbt silently treats a self-reference as an incremental this reference
Explanation

Correct: ref() to the model's own name creates a self-edge in the DAG; dbt detects the cycle during graph construction and fails with a dependency-cycle/'Found a cycle' error. Option 2 is wrong: dbt fails at graph-building time, so the SQL is never submitted to the warehouse. Option 3 is wrong: {{ this }} is the supported self-reference inside incremental logic; ref('self') is not silently rewritten. Option 4 is wrong: cycles are hard errors, not warnings.

4.

After adding a new package, dbt run fails immediately with:

Compilation Error
  dbt found two macros with the name "generate_schema_name" in the project "my_project".

Which TWO actions are valid resolutions? (Select TWO.)

  • A. Move one of the macros into models/ so it is parsed as a model instead of a macro
  • B. Rename or delete one of the duplicate macro definitions so only one exists in the project's macro paths✓ Correct
  • C. Ensure the duplicate is not simply the same macro file copied into two directories listed in macro-paths✓ Correct
  • D. Set dispatch config in dbt_project.yml to choose between the duplicates
  • E. Add --full-refresh to the run command so dbt re-registers macros
Explanation

Correct (1): dbt requires unique macro names within a project namespace; removing/renaming one duplicate resolves it. Correct (2): a common cause is the same file existing under two paths configured in macro-paths (e.g., macros/ and a nested copy), so dbt parses it twice. Option 3 is wrong: --full-refresh affects incremental rebuild behavior, not macro parsing. Option 4 is wrong: .sql files in models/ are parsed as models and would error or create a bogus model; macros must live in macro paths. Option 5 is wrong: dispatch resolves adapter-specific macro packages for adapter.dispatch() lookups; it does not de-duplicate two identically named macros in the same project.

5.

A CI job fails with:

Compilation Error
  dbt found 2 models with the name "stg_customers"

One is at models/staging/jaffle/stg_customers.sql and the other at models/staging/stripe/stg_customers.sql. Which TWO approaches resolve this correctly? (Select TWO.)

  • A. Define each model in a separate .yml file so dbt treats them as distinct nodes
  • B. Move one model into a package and reference it with the two-argument ref('package','stg_customers')✓ Correct
  • C. Give each model a distinct alias config while keeping the same file name
  • D. Configure the two models into different schemas via dbt_project.yml
  • E. Rename the files (and any refs) to unique names such as stg_jaffle__customers and stg_stripe__customers✓ Correct
Explanation

Correct (1): model resource names must be unique within a project; renaming files (the standard stg_<source>__<entity> convention) is the canonical fix. Correct (5): names only need to be unique per package, so a model in an installed package may share a name, and the two-argument ref() disambiguates it. Option 2 is wrong: alias changes the relation name in the warehouse but not the node name dbt uses for uniqueness. Option 3 is wrong: different target schemas also do not change node names; the duplicate-name check is project-graph level. Option 4 is wrong: YAML files provide configuration/documentation; they cannot make two identically named SQL files distinct nodes.

Test yourself across every dbt Analytics Engineering Certification domain

The free dbt Analytics Engineering Certification practice test mixes about 20 questions weighted like the exam. The full 327-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Debugging Data Modeling Errors study guide (dbt Analytics Engineering Certification) →

Other dbt Analytics Engineering Certification domains

← All dbt Analytics Engineering Certification study resources