Home / dbt Analytics Engineering Certification / Mock exam
dbt Analytics Engineering Certification Exam-style mock test

dbt Analytics Engineering Certification Practice Exams|Practice test

Full explanations Exam format Pass line 65%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · dbt Fundamentals & Project Structure
An analytics engineer at a B2B SaaS company initializes a new dbt project to model subscription data. A teammate asks which file dbt uses to recognize the directory as a valid project and to read top-level settings like the project name and model paths. Which file serves this purpose?
・The profiles.yml file, which stores the warehouse connection credentials used at runtime
Incorrect. profiles.yml holds connection and credential details, but it is not what marks a directory as a dbt project.
✓The dbt_project.yml file, which defines the project name, version, and configuration paths
Correct. dbt_project.yml is the required configuration file that identifies the directory as a dbt project and sets top-level settings.
・The packages.yml file, which declares external dependencies installed via dbt deps
Incorrect. packages.yml lists third-party packages to install, but its absence does not prevent dbt from recognizing the project.
・The schema.yml file placed in the models directory to document columns and tests
Incorrect. schema.yml files document and test models, yet they are optional and do not define the project itself.
Explanation
Every dbt project must contain a dbt_project.yml file at its root; dbt reads it to locate models, seeds, and other resources and to apply project-wide configuration.
Example2 · Models, Materializations & refs
At a B2B SaaS company, an analytics engineer creates a file called models/marts/active_accounts.sql containing a single SELECT statement. After a successful dbt run, what does dbt produce in the data warehouse by default?
・A new database schema named active_accounts that stores every intermediate query result produced while compiling the project
Incorrect. dbt does not create a schema per model; the SELECT becomes one object, and the schema comes from project or profile configuration, not the file name.
✓A relation named active_accounts, with the model file's base name becoming the name of the created object
Correct. dbt wraps the model's SELECT in DDL and builds a relation whose name is the model file's base name (active_accounts) in the target schema.
・A temporary scratch table that dbt silently drops at the end of the run once downstream tests have finished executing
Incorrect. The object persists as a view or table based on materialization; it is not a scratch table silently dropped after the run.
・A stored procedure called active_accounts that must be invoked manually before the compiled SELECT returns any rows
Incorrect. dbt builds a view or table, not a stored procedure, and no manual invocation is required to query the result.
Explanation
A dbt model is a SELECT in a .sql file; dbt compiles it into DDL and creates a relation named after the file in the configured schema.
Example3 · Testing, Documentation & Sources
At a B2B SaaS company, every row in the stg_subscriptions model must reference an account_id that exists in the stg_accounts model's account_id column. Which generic test should the analytics engineer configure on stg_subscriptions.account_id to enforce this?
✓Add a relationships test that points to the stg_accounts model and references its account_id field as the parent key
Correct. The relationships generic test validates referential integrity by confirming each child value exists in a referenced parent model and column, which is exactly this requirement.
・Add an accepted_values test enumerating each valid account_id that currently appears in the stg_accounts model
Incorrect. accepted_values hard-codes a fixed list of allowed strings, so it would break as new accounts are added and does not reference another model.
・Add a not_null test on account_id and a separate unique test to prevent duplicate subscription rows
Incorrect. not_null and unique only check for missing or duplicate values and never verify that the id exists in stg_accounts.
・Add a dbt_utils.expression_is_true test joining both staging models on account_id
Incorrect. expression_is_true evaluates a boolean per row and is not the idiomatic referential-integrity test that relationships provides out of the box.
Explanation
The relationships test is dbt's built-in mechanism for foreign-key style referential integrity between a child column and a parent model's column.
Example4 · Jinja, Macros & Packages
An analytics engineer at a healthcare services firm adds Jinja to a model that stages patient encounter data. They want the compiled SQL to include the actual value returned by ref(), such as a database-qualified table name. Which Jinja delimiter should wrap the ref() call so its result is rendered into the SQL text?
・A statement delimiter {% ... %}, which runs the logic but does not print its output into the compiled SQL that dbt executes
Incorrect. Statement delimiters {% ... %} execute control logic like set, if, or for but intentionally do not emit their result into the rendered SQL.
✓An expression delimiter {{ ... }}, which evaluates the enclosed call and prints the resulting value into the compiled SQL
Correct. Expression delimiters {{ ... }} evaluate the enclosed expression, such as ref(), and print the returned value directly into the compiled SQL dbt runs.
・A comment delimiter {# ... #}, which documents the reference inline but is stripped out before the SQL is compiled
Incorrect. Comment delimiters {# ... #} are removed during compilation, so nothing inside them appears in the final SQL.
・A raw delimiter {% raw %}, which escapes the reference so it is preserved literally and never evaluated at all
Incorrect. The raw block prevents Jinja from processing the content, which is the opposite of what is needed to render a ref() value.
Explanation
Only the expression delimiter {{ ... }} both evaluates Jinja and prints the output into the compiled SQL.
Example5 · Deployment, Jobs & Orchestration
A healthcare services firm needs its nightly dbt Cloud job to rebuild all marts and validate them before analysts arrive at 6 AM. The data engineer wants the job to both materialize models and run the associated assertions in one scheduled execution. Which job command configuration meets this requirement?
・Schedule two separate jobs, one calling dbt run and a later one calling dbt test, chained by overlapping cron triggers
Incorrect. Two cron-triggered jobs overlapping by timing is fragile and does not guarantee tests run after models in the same execution context.
✓Add dbt build as the job step so models are materialized and their tests execute together in dependency order
Correct. dbt build runs models and their tests interleaved in DAG order within a single command, satisfying the materialize-then-validate requirement.
・Configure the job with dbt compile followed by dbt docs generate so the tests are embedded in the manifest
Incorrect. dbt compile and dbt docs generate only produce artifacts and documentation; neither materializes models nor executes tests.
・Use dbt seed in the job so the reference data loads and the schema tests run automatically against the marts
Incorrect. dbt seed loads CSV reference data and does not build the marts nor trigger the schema tests on those marts.
Explanation
dbt build combines run, test, snapshot, and seed into a single DAG-ordered execution, so each model is built and immediately validated before downstream nodes proceed.
Example6 · dbt Fundamentals & Project Structure
A data team at MercyBridge Health Services is onboarding a new analytics engineer who asks where dbt sits in their stack. Raw claims and patient encounter data already land in Snowflake via Fivetran. Which statement best describes dbt's responsibility in this pipeline?
・dbt extracts encounter records from the source systems and loads them into Snowflake on a schedule
Incorrect. Extraction and loading are handled by tools like Fivetran; dbt is the transformation (T) layer and does not move raw data into the warehouse.
✓dbt transforms data already loaded in the warehouse by compiling and running SQL models against it
Correct. dbt operates on data already in the warehouse, compiling SQL models and executing them so the warehouse does the transformation work.
・dbt replaces Snowflake as the compute and storage engine that physically holds the warehouse tables
Incorrect. dbt does not store or compute data itself; it pushes SQL down to the warehouse such as Snowflake, which provides storage and compute.
・dbt orchestrates Fivetran connectors and manages the warehouse's user roles and access grants directly
Incorrect. dbt does not run connectors or manage warehouse security; it focuses on transforming loaded data into analytics-ready models.
Explanation
dbt owns the 'T' in ELT: it transforms data that extract-load tools have already landed in the warehouse by compiling and running SQL against the warehouse's compute.
Example7 · dbt Fundamentals & Project Structure
The analytics team at UrbanThread, a retail apparel brand, scaffolds a new dbt project for its sales warehouse. A junior engineer asks what the dbt_project.yml file at the root is responsible for. Which description best captures its purpose?
・It stores the warehouse credentials and connection target that dbt uses to authenticate against the UrbanThread sales database at runtime.
Incorrect. Credentials and connection targets live in the profiles.yml file, not in dbt_project.yml which carries no secrets.
✓It defines project-level configuration such as the project name, model paths, and default materializations for UrbanThread's models.
Correct. dbt_project.yml declares the project name, directory paths, and default configurations like materializations for the whole project.
・It is a generated artifact holding the compiled SQL and run results produced each time the UrbanThread models are executed by dbt.
Incorrect. Compiled SQL and run results are written to the target directory as artifacts, not stored in dbt_project.yml.
・It contains the catalog of source table freshness thresholds that dbt checks before every scheduled run of the UrbanThread pipeline.
Incorrect. Source freshness thresholds are configured in schema YAML files under sources, not in the dbt_project.yml root file.
Explanation
dbt_project.yml is the central configuration file identifying the project and setting project-wide defaults such as paths and materializations.
Example8 · dbt Fundamentals & Project Structure
At UrbanThread, developers run dbt locally against the warehouse but the shared Git repository should never contain database passwords. Where should the warehouse connection details for each developer be stored so they stay out of version control?
・Inside the dbt_project.yml file under a dedicated connection block committed alongside the rest of the UrbanThread project settings.
Incorrect. dbt_project.yml holds project configuration and is committed to Git, so storing passwords there would expose them.
✓In the profiles.yml file, which by default lives outside the project directory and holds each target's connection details.
Correct. profiles.yml stores connection credentials and by default resides outside the repo, keeping secrets out of version control.
・In a sources.yml file placed in the models folder so dbt can resolve the UrbanThread warehouse at compile time for every model.
Incorrect. sources.yml declares source tables and freshness, not warehouse credentials or connection authentication details.
・In environment-specific packages.yml entries that dbt reads when installing dependencies before running UrbanThread models.
Incorrect. packages.yml lists package dependencies to install and has nothing to do with warehouse connection credentials.
Explanation
Connection credentials belong in profiles.yml, which is kept outside the project directory and excluded from version control.
Example9 · dbt Fundamentals & Project Structure
An UrbanThread model named fct_orders selects from an upstream model stg_orders. The engineer wants dbt to automatically build stg_orders before fct_orders and to insert the correct schema-qualified table name. How should the FROM clause reference stg_orders?
・By hardcoding the fully qualified analytics.stg_orders table name directly in the FROM clause so the environment always resolves correctly.
Incorrect. Hardcoding the table name breaks environment portability and prevents dbt from tracking the dependency for build ordering.
✓By writing {{ ref('stg_orders') }} in the FROM clause so dbt builds the dependency first and resolves the name.
Correct. The ref function tells dbt the model depends on stg_orders, enabling correct build order and schema resolution.
・By using {{ source('analytics', 'stg_orders') }} to point at the upstream model and let dbt order the build graph.
Incorrect. The source function references raw external tables, not models built within the project like stg_orders.
・By importing stg_orders through a packages.yml dependency entry and then selecting from the installed package namespace.
Incorrect. packages.yml installs third-party packages; it is not how you reference another model within the same project.
Explanation
ref creates the dependency edge dbt uses to order builds and injects the correctly qualified relation name for the referenced model.
Example10 · dbt Fundamentals & Project Structure
A financial services firm is modernizing its analytics platform. Raw transaction data is already loaded into Snowflake by Fivetran, and the analytics engineering team wants to introduce dbt. Which responsibility does dbt take on within this ELT architecture?
✓dbt executes SQL transformations inside the data warehouse to turn already-loaded raw data into clean, tested, documented models
Correct. dbt is the transformation (T) layer of ELT and compiles and runs SQL against the warehouse to build modeled tables and views from raw data.
・dbt extracts transaction records from the firm's source systems and loads them into the warehouse
Incorrect. Extraction and loading are handled by tools like Fivetran; dbt deliberately does not do EL, it assumes data is already in the warehouse.
・dbt replaces the warehouse compute engine and runs transformations on its own servers
Incorrect. dbt pushes compute down to the warehouse (Snowflake here) rather than replacing or running its own execution engine.
・dbt provides the dashboards and visualizations that business analysts use to review results
Incorrect. Visualization and dashboards are the job of BI tools; dbt produces the trusted models those tools query.
Explanation
dbt owns only the transformation step of ELT, orchestrating SQL that the warehouse itself executes against already-loaded raw data.
Example11 · dbt Fundamentals & Project Structure
An analytics engineer at a bank initializes a new dbt project for the fraud analytics team and runs a command that fails because dbt cannot recognize the directory as a project. Which file must be present at the project root for dbt to treat the directory as a valid dbt project?
✓The dbt_project.yml configuration file that defines the project name, version, and resource paths
Correct. dbt_project.yml at the project root is mandatory and is what identifies the folder as a dbt project while declaring name, version, and paths.
・A profiles.yml file stored in the project root alongside the models directory
Incorrect. profiles.yml holds connection credentials and normally lives in ~/.dbt, outside the project, so it is not what marks the directory as a project.
・A packages.yml file listing every third-party dbt package the team imports
Incorrect. packages.yml is optional and only needed when importing packages, so a project is valid without it.
・A sources.yml file enumerating each raw table loaded into the warehouse
Incorrect. Source definitions are optional YAML and do not determine whether a directory is recognized as a dbt project.
Explanation
Only dbt_project.yml is required at the root to make a directory a valid dbt project; the other files are optional or stored elsewhere.
Example12 · dbt Fundamentals & Project Structure
A manufacturing distributor loads raw order, inventory, and shipment tables straight into Snowflake from their ERP. The analytics engineering team adopts dbt to prepare reporting datasets. In this ELT architecture, what is dbt's primary responsibility?
・Extracting the ERP source records and loading each table into the warehouse on a schedule
Incorrect. Extraction and loading are handled by ingestion tools; dbt operates only after data already sits in the warehouse.
✓Transforming already-loaded warehouse data into cleaned, modeled tables and views using SQL
Correct. dbt is the transformation (the T) layer of ELT, modeling data that is already loaded into the warehouse using SQL.
・Replicating the warehouse tables into an external storage bucket for long-term archival retention
Incorrect. Archival replication to external storage is a warehouse or storage concern, not a transformation performed by dbt.
・Orchestrating the BI dashboards that visualize the final warehouse reporting datasets for users
Incorrect. dbt does not render dashboards; BI tools consume the modeled tables that dbt produces downstream.
Explanation
In ELT, data is extracted and loaded first, then dbt transforms the in-warehouse data into analytics-ready models using SQL.
Example13 · dbt Fundamentals & Project Structure
An analytics engineer at the distributor scaffolds a new dbt project for the shipments domain and runs a command, which fails because dbt cannot recognize the directory as a project. Which file must exist at the project root for dbt to treat the directory as a valid dbt project?
・profiles.yml
Incorrect. profiles.yml stores connection credentials and lives outside the project (commonly in ~/.dbt), not at the project root to define it.
✓dbt_project.yml
Correct. dbt_project.yml at the root is the required configuration file that identifies and configures a dbt project.
・packages.yml
Incorrect. packages.yml declares external package dependencies and is optional, so its absence does not invalidate the project.
・schema.yml
Incorrect. A schema.yml file documents and tests models but is optional and does not establish the directory as a dbt project.
Explanation
dbt_project.yml is the mandatory root file that defines the project; profiles.yml handles connections separately.
Example14 · dbt Fundamentals & Project Structure
A telecom operator's analytics engineer opens a new dbt project for the billing team and must configure the project-level settings such as the model paths and default materializations. Which file is the correct place for these project-wide configuration settings?
・The profiles.yml file, which stores the warehouse connection credentials used to run the models
Incorrect. profiles.yml holds connection credentials and targets, not project-wide model paths or default materializations.
✓The dbt_project.yml file at the root, which defines paths and project configurations
Correct. dbt_project.yml at the project root is where paths, default materializations, and project configurations are defined.
・A packages.yml file, which lists third-party dbt packages the project depends on
Incorrect. packages.yml declares external package dependencies, not the project's own path and materialization settings.
・The schema.yml file placed inside the models directory for each billing subfolder
Incorrect. schema.yml files declare tests and documentation for models, not global project configuration.
Explanation
dbt_project.yml is the required root file that tells dbt the project's directory layout and default configurations; connection details live in profiles.yml.
Example15 · dbt Fundamentals & Project Structure
In the telecom operator's dbt repository, a teammate writes reusable Jinja macros to standardize how phone-number formatting SQL is generated across many models. Into which project directory should these macro files be placed?
・The models directory, alongside the SQL files that select from the raw call-detail-record sources
Incorrect. The models directory holds the SQL transformations themselves, not the reusable Jinja macros they call.
・The seeds directory, where small CSV lookup files are version-controlled and loaded into the warehouse
Incorrect. The seeds directory is for small CSV files loaded as tables, not for Jinja macro definitions.
✓The macros directory, which holds reusable Jinja code
Correct. The macros directory is the standard location for reusable Jinja macros shared across models.
・The snapshots directory, which captures slowly changing dimension history for subscriber records
Incorrect. The snapshots directory stores snapshot definitions for tracking record history, not macros.
Explanation
By convention dbt discovers Jinja macros from the macros directory (and installed packages), keeping reusable SQL-generating logic separate from models.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)