Winter Sale- Special Discount Limited Time 65% Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

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

dbt Analytics Engineering Certification Exam Questions and Answers

Question 1

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.

Question # 1

Options:

Question 2

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 3

You have created a model called stg_tasks and now you need to implement tests.

You provide this in schema.yml:

version: 2

models:

- name: stg_tasks

columns:

- name: completed_at

tests:

- not_null:

- config:

where: "state = 'completed'"

You receive this compilation error:

[WARNING]: Did not find matching node for patch with name 'stg_tasks' in the 'models' section of file 'models/example/schema.yml'

How can you change the configuration on the not_null test to fix this compiler error?

Options:

A.

tests:

- not_null:

- config:

where: "state = 'completed'"

B.

tests:

- not_null:

config:

where: "state = 'completed'"

C.

tests:

- not_null:

config:

where: "state = 'completed'"

D.

tests:

- not_null:

- config:

where: "state = 'completed'"

Choose 1 option.

Question 4

Choose whether these scenarios describe a test or a contract:

Question # 4

Options:

Question 5

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 6

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 7

A dbt run failed with an error message.

Order these steps to fix your pipeline.

Question # 7

Options:

Question 8

Question # 8

Options:

Question 9

Your model has a contract on it.

When renaming a field, you get this error:

This model has an enforced contract that failed.

Please ensure the name, data_type, and number of columns in your contract match

the columns in your model's definition.

| column_name | definition_type | contract_type | mismatch_reason |

|-------------|------------------|----------------|-----------------------|

| ORDER_ID | TEXT | TEXT | missing in definition |

| ORDER_KEY | TEXT | | missing in contract |

Which two will fix the error? Choose 2 options.

Options:

A.

Remove order_id from the contract.

B.

Remove order_key from the contract.

C.

Remove order_id from the model SQL.

D.

Add order_key to the contract.

E.

Add order_key to the model SQL.

Question 10

Is this materialization supported by Python models in dbt?

Ephemeral

Options:

A.

Yes

B.

No

Question 11

Choose a correct command for each statement.

Question # 11

Options:

Question 12

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?

Options:

A.

Incorporate a log function into your macro.

B.

Check your SQL to see if you quoted something incorrectly.

C.

Check your Jinja and see if you nested your curly brackets.

D.

Take a look at the compiled code.

Question 13

Consider this DAG:

app_data.detail_categories -> stg_detail_categories -> skills_with_details

app_data.details -> stg_details -> lessons_with_details

What will support making this DAG more modular? Choose 1 option.

Options:

A.

Union stg_detail_categories and stg_details in the staging layer to reduce the need for downstream joins.

B.

Join stg_detail_categories and stg_details in the staging layer to reduce the need for downstream joins.

C.

Consolidate the two staging models into one model and then use this downstream for both skills_with_details and curriculum_with_details.

D.

Combine lessons_with_details and skills_with_details into one wide table called curriculum_with_details.

E.

Examine the SQL of lessons_with_details and skills_with_details to see if there is a candidate for an intermediate model.

Question 14

Which two are true for a dbt retry command?

Choose 2 options.

Options:

A.

It reruns all nodes in your previous invocation statement.

B.

It retries the previous command if it is not a syntax error in a model.

C.

It picks up from the error without running all of the upstream dependencies.

D.

It reuses selectors from the previous command.

E.

It reads a manifest.json file to identify the models and tests that failed in the last run.

Question 15

You are building an incremental model.

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

Question # 15

Options:

Question 16

Question # 16

Options:

Question 17

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

Question # 17

Options:

Question 18

A developer imports a package from a private repository called timeformat for use within their project.

Which statement is correct? Choose 1 option.

Options:

Options:

A.

“The package can be added with this configuration in the packages.yml file:”

packages:

- local: /opt/dbt/timeformat

B.

“The package can be installed by running the command dbt build.”

C.

“The package default schema can be overridden in the dbt_project.yml file as:”

models:

timeformat:

+schema: timeseries

D.

“Including the package version/revision in the packages.yml file, for private git packages will result in an error.”

Question 19

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