dbt Analytics Engineering Certification Exam Questions and Answers
Which two mechanisms allow dbt to write DRY code by reusing logic, preventing writing the same code multiple times?
Choose 2 options.
Examine how freshness is defined at the database level:
- name: raw
database: raw
freshness: # default freshness
warn_after: {count: 12, period: hour}
error_after: {count: 24, period: hour}
loaded_at_field: _etl_loaded_at
How can one table from the source raw be excluded from source freshness?
A developer has updated multiple models in their dbt project, materialized as tables and views.
They want to run and test all models upstream and downstream from the modified models that are materialized as views.
What command will achieve this? Choose 1 option.
Which two dbt commands work with dbt retry?
Choose 2 options.
Which two code snippets result in a lineage line being shown in the DAG? Choose 2 options.
Which two configurations can be applied to a dbt test?
Choose 2 options.
You want to run and test the models, tests, and snapshots you have added or modified in development.
Which will you invoke? Choose 1 option.
Options:

Examine the code:
select
left(customers.id, 12) as customer_id,
customers.name as customer_name,
case when employees.employee_id is not null then true else false end as is_employee,
event_signups.event_name,
event_signups.event_date,
sum(case when visit_accomodations.type = 'hotel' then 1 end)::boolean as booked_hotel,
sum(case when visit_accomodations.type = 'car' then 1 end)::boolean as booked_ride
from customers
-- one customer can sign up for many events
left join event_signups
on left(customers.id, 12) = event_signups.customer_id
-- an event signup for a single customer can have many types of accommodations booked
left join visit_accomodations
on event_signups.signup_id = visit_accomodations.signup_id
and left(customers.id, 12) = visit_accomodations.customer_id
-- an employee can be a customer
left join employees
on left(customers.id, 12) = employees.customer_id
group by 1, 2

You have just executed dbt run on this model:
select * from {{ source("{{ env_var('input') }}", 'table_name') }}
and received this error:
Compilation Error in model my_model
expected token ':', got '}'
line 14
{{ source({{ env_var('input') }}, 'table_name') }}
How can you debug this?
You want to configure dbt to prevent tests from running if one or more of their parent models is unselected.
Which test command should you execute?
Choose 1 option.
Which two statements about Exposures are true?
Choose 2 options.
Consider these SQL and YAML files for the model model_a:
models/staging/model_a.sql
{{ config(
materialized = "view"
) }}
with customers as (
...
)
dbt_project.yml
models:
my_new_project:
+materialized: table
staging:
+materialized: ephemeral
Which is true about model_a? Choose 1 option.
Options:
Match the macro to the appropriate hook so that the correct execution steps comply with these rules:
macro_1() needs to be executed after every dbt run.
macro_2() needs to be executed after a model runs.
macro_3() needs to execute before every dbt run.
macro_4() needs to be executed before a model runs.

32. You are creating a fct_tasks model with this CTE:
with tasks as (
select * from {{ ref('stg_tasks') }}
)
You receive this compilation error in dbt:
Compilation Error in model fct_tasks (models/marts/fct_tasks.sql)
Model 'model.dbt_project.fct_tasks' (models/marts/fct_tasks.sql) depends on a node named 'stg_tasks' which was not found
Which is correct? Choose 1 option.
Options:
Examine the configuration for the source:
sources:
- name: jaffle_shop
schema: jaffle_shop_raw_current
tables:
- name: orders
identifier: customer_orders
Which reference to the source is correct?
Which two are true for a dbt clone command?
Choose 2 options.
You work at an e-commerce company and a vendor provides their inventory data via CSV file uploads to an S3 bucket.
How do you prep the data for dbt transformations?
Choose 1 option.




