New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

dbt Labs dbt-Analytics-Engineering dbt Analytics Engineering Certification Exam Exam Practice Test

dbt Analytics Engineering Certification Exam Questions and Answers

Question 1

Options:

Question 2

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:

Options:

A.

stg_tasks is configured as ephemeral.

B.

There is no dbt model called stg_tasks.

C.

There is no stg_tasks in the data warehouse.

D.

A stg_tasks has not been defined in schema.yml.

Question 3

Which two statements about Exposures are true?

Choose 2 options.

Options:

A.

Models, sources, and metrics are downstream from Exposures.

B.

Exposures are materialized in the database.

C.

Exposures describe a downstream use of your dbt project.

D.

Exposures are defined in .sql files.

E.

You can run, test, and list resources that feed into your Exposure.

Question 4

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?

Options:

A.

Add freshness: null to the table configuration.

B.

Since freshness is defined at the source level, all tables in the source must adhere to the freshness parameters.

C.

Add loaded_at_field: null to the table configuration.

D.

Add error_after: null to the table configuration.

Question 5

16. Your tests folder looks like:

tests

└── generic

└── furniture_customers_test.sql

macro_stg_tpch_orders_assert_pos_price.sql

macro_stg_tpch_suppliers_assert_pos_acct_bal.sql

stg_tpch_orders_assert_positive_price.sql

You run the command:

dbt test --select 'test_type:singular'

What will the command run?

Options from screenshot:

Options:

A.

furniture_customers_test

B.

furniture_customers_test

macro_stg_tpch_orders_assert_pos_price

macro_stg_tpch_suppliers_assert_pos_acct_bal

stg_tpch_orders_assert_positive_price

C.

macro_stg_tpch_orders_assert_pos_price

macro_stg_tpch_suppliers_assert_pos_acct_bal

stg_tpch_orders_assert_positive_price

Question 6

Which explanation describes how dbt infers dependencies between models?

Choose 1 option.

Options:

A.

Information is gathered from the use of source and ref macros.

B.

All source and ref macros are resolved to database objects and dbt queries them for dependencies.

C.

The underlying SQL code is parsed and relationships are created from explicit table references.

D.

.yml configurations for sources and refs are parsed for dependency information.

Question 7

What must happen before you can build models in dbt?

Choose 1 option.

Options:

A.

Sources must have been defined in your dbt project.

B.

You must have created a service account in your data platform.

C.

Underlying data must be accessible on your data platform.

D.

Raw data must be cleaned.

Question 8

You wrote this test against your fct_orders model to confirm status filters were properly applied by a parent model:

{{

config(

enabled=true,

severity='error'

)

}}

select *

from {{ ref('fct_orders') }}

where status_code = 13

Which statement about this test is true?

Options:

A.

You must attach the test to the model in orders.yml for it to run.

B.

This test will warn instead of erroring when you use the --warn-error flag.

C.

The file must be saved in the tests/generic directory.

D.

Records with status_code = 13 will cause this test to fail.

Question 9

Examine this query:

select *

from {{ ref('stg_orders') }}

where amount_usd < 0

You want to make this a generic test across multiple models.

Which set of two standard arguments should be used to replace {{ ref('stg_orders') }} and amount_usd? Choose 1 option.

Options:

A.

source and column

B.

model and column_name

C.

model_name and column_name

D.

model and field

Question 10

You are building an incremental model.

Identify the circumstances in which is_incremental() would evaluate to True or False.

Options:

Question 11

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?

Options:

A.

{{ source('jaffle_shop_raw_current', 'customer_orders') }}

B.

{{ source('jaffle_shop_raw_current', 'orders') }}

C.

{{ source('jaffle_shop', 'orders') }}

D.

{{ source('jaffle_shop', 'customer_orders') }}

Question 12

13. An analyst on your team has informed you that the business logic creating the is_active column of your stg_users model is incorrect.

You update the column logic to:

case

when state = 'Active'

then true

else false

end as is_active

Which test can you add on the state column to support your expectations of the source data? Choose 1 option.

Options:

A.

- name: state

tests:

- accepted_values:

values: ['active', 'churned', 'trial']

- not_null

B.

- name: is_active

tests:

- accepted_values:

values: ['active', 'churned', 'trial']

- not_null

C.

- name: state

tests:

- not_null

- unique

D.

- name: is_active

tests:

- not_null

- unique

Question 13

You are working on a complex dbt model with many Common Table Expressions (CTEs) and decide to move some of those CTEs into their own model to make your code more modular.

Is this a benefit of this approach?

The new model can be documented to explain its purpose and the logic it contains.

Options:

A.

Yes

B.

No

Question 14

You are working with git to version control the dbt logic.

Order these steps to add or modify transformations to your dbt project.

Options:

Question 15

Which two are true for a dbt clone command?

Choose 2 options.

Options:

A.

It requires the reference to a manifest from a previous dbt invocation.

B.

It allows comparison between manifests of source and target dbt runs, but does not create any objects itself.

C.

It allows testing your code changes on downstream dependencies outside of dbt (such as a BI tool).

D.

It can be used to replicate data across different data warehouses.

E.

It creates new versions of your dbt models suffixed with _v#.

Question 16

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.

Options:

Question 17

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:

Options:

A.

Select statements made from the database on top of model_a and transformation processing within model_a will be quicker, but the data will only be as up to date as the last dbt run.

B.

Select statements made from the database on top of model_a will result in an error.

C.

Select statements made from the database on top of model_a will be slower, but the data will always be up to date.

D.

Select statements made from the database on top of model_a will be quicker, but the data will only be as up to date as the last dbt run.

(Note: A and D are duplicates — typical exam formatting.)

Question 18

Choose a correct command for each statement.

Options:

Question 19

The dbt_project.yml file contains this configuration:

models:

+grants:

select: ['reporter']

How can you grant access to the object in the data warehouse to both reporter and bi?

Options:

A.

{{ config(grants = { '+select': ['bi'] }) }}

B.

{{ config(grants = { 'select': ['+bi'] }) }}

C.

{{ config(grants = { 'select': ['bi'], 'inherits': true }) }}

D.

{{ config(grants = { 'select': ['bi'], 'include': ['dbt_project.yml'] }) }}