Spring Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

dbt-Analytics-Engineering Questions Bank

dbt Analytics Engineering Certification Exam Questions and Answers

Question 5

Options:

Question 6

You have written this new agg_completed_tasks dbt model:

with tasks as (

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

)

select

user_id,

{% for task in tasks %}

sum(

case

when task_name = '{{ task }}' and state = 'completed'

then 1

else 0

end

) as {{ task }}_completed

{% endfor %}

from tasks

group by 1

The dbt model compiles to:

with tasks as (

select * from analytics.dbt_user.stg_tasks

)

select

user_id,

from tasks

group by 1

The case when statement did not populate in the compiled SQL. Why?

Options:

A.

Because there is not a {% if not loop.last %}{% endif %} to compile a valid case when statement.

B.

Because the Jinja for-loop should be written with {{ }} instead of {% %}.

C.

Because there is no {% set tasks %} statement in the model defining the tasks variable.

D.

Because there is not a task_name column in stg_tasks.

Question 7

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'] }) }}

Question 8

You run this command:

dbt build --select "source_status:fresher+" --state path/to/prod/artifacts

Which two need to happen before it can be executed successfully?

Choose 2 options.

Options:

A.

Invoke the command: dbt source freshness.

B.

Invoke either dbt run or dbt build.

C.

Add generic tests to your sources.

D.

Define a freshness block on your source(s).

E.

Test your sources with dbt test.