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

Pass the dbt Labs Analytics Engineers dbt-Analytics-Engineering Questions and answers with CertsForce

Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions
Questions # 1:

Which two mechanisms allow dbt to write DRY code by reusing logic, preventing writing the same code multiple times?

Choose 2 options.

Options:

A.

Copy/pasting folders containing multiple models


B.

Writing and using dbt macros


C.

Creating singular tests


D.

Using dbt packages


E.

Changing a model materialization from view to ephemeral


Expert Solution
Questions # 2:

Question # 2


Expert Solution
Questions # 3:

Given this dbt_project.yml:

name: "jaffle_shop"

version: "1.0.0"

config-version: 2

profile: "snowflake"

model-paths: ["models"]

macro-paths: ["macros"]

snapshot-paths: ["snapshots"]

target-path: "target"

clean-targets:

- "logs"

- "target"

- "dbt_modules"

- "dbt_packages"

models:

jaffle_shop:

orders:

materialized: table

When executing a dbt run your models build as views instead of tables:

19:36:14 Found 1 model, 0 tests, 0 snapshots, 0 analyses, 179 macros, 0 operations, 0 seed files, 0 sources, 0 exposures, 0 metrics

19:36:16 Concurrency: 1 threads (target='default')

19:36:17 Finished running 1 view model in 3.35s.

19:36:17 Completed successfully

19:36:17 Done. PASS=1 WARN=0 ERROR=0 SKIP=0 TOTAL=1

Which could be a root cause of why the model was not materialized as a table?

The target-path is incorrectly configured.

Options:

A.

Yes


B.

No


Expert Solution
Questions # 4:

You want to add new columns to an existing model with a new version.

What will trigger warnings for removal of older model versions?

Choose 1 option.

Options:

A.

Create a new version of the model


B.

Provide a configuration for deprecation_date


C.

Configure the old model as enabled: false


D.

Include “deprecated” in the description of the model


Expert Solution
Questions # 5:

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.


Expert Solution
Questions # 6:

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


Expert Solution
Questions # 7:

Which two are true about version controlling code with Git?

Choose 2 options.

Options:

A.

Git automatically creates versions of files with suffixes.


B.

All the code changes along the lifecycle of a project are tracked.


C.

When bugs are raised, email notifications are automatically sent by Git to repository users.


D.

Git prevents any sensitive fields from being saved in code.


E.

Code can be reverted to a previous state.


Expert Solution
Questions # 8:

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.


Expert Solution
Questions # 9:

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.)


Expert Solution
Questions # 10:

Match the desired outcome to the dbt command or argument.

Question # 10


Expert Solution
Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions