0% found this document useful (0 votes)
5K views23 pages

DBT Analytics Engineering Exam Questions

Dbt Analytics Engineering

Uploaded by

Doris Inman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5K views23 pages

DBT Analytics Engineering Exam Questions

Dbt Analytics Engineering

Uploaded by

Doris Inman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Data Build Tool

dbt-Analytics-Engineering
dbt Analytics Engineering Certification
QUESTION & ANSWERS

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
QUESTION: 1

Given the snapshot config, how check_cols will be used

{{

config(

target_schema='history',

target_database='analytics',

strategy='timestamp',

unique_key='id',

updated_at='updated_at',

check_cols=[“col_1”, “col_2”]

}}

Option A :

check_cols will be ignored

Option B :

updated_at column will be used to determine changes first and check_cols will be used in case of any
duplicate

Option C :

Snapshot will check all columns in check_cols for changes

Option D :

updated_at and col_1 will be used for snapshot

Correct Answer: A

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Explanation/Reference:

https://docs.getdbt.com/docs/build/snapshots

QUESTION: 2

Given following model code

Select col_1, col_2 From {{ ref(‘model_a’) }}

While running dbt run, following error occurred: table does not exist What is the most likely error (Choose 2)

Option A :

Wrong Database or Schema

Option B :

Not enough permission

Option C :

Wrong Adapter

Option D :

Wrong table name

Correct Answer: A,B

Explanation/Reference:

At model level, wrong column or not enough permission are most likely issue

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
QUESTION: 3

Given following configuration in dbt_project.yml file: target-path: compiled-target where will the artefacts be
generated if dbt compile command is issued

Option A :

/target

Option B :

/target-path

Option C :

/compiled-target

Option D :

/target/compiled-target

Correct Answer: C

Explanation/Reference:

https://docs.getdbt.com/reference/project-configs/target-path

QUESTION: 4

What best describes var() in dbt

Option A :

function can be used to incorporate Environment Variables from the system into your dbt project

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option B :

can be passed from your dbt_project.yml file into models during compilation

Option C :

outputs a UUID generated for this dbt command. This value is useful when auditing or analyzing dbt
invocation metadata.

Option D :

variable returns the installed version of dbt that is currently running

Correct Answer: B

Explanation/Reference:

https://docs.getdbt.com/reference/dbt-jinja-functions/var

QUESTION: 5

Given the below properties, how marts/model_a.sql will be materialized

models:

my_project:

dwh:

# materialize all models in models/events as tables

+materialized: incremental

marts:

# this is redundant, and does not need to be set

+materialized: table

Option A :

View

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option B :

Table

Option C :

Incremental

Option D :

Ephemeral

Correct Answer: B

Explanation/Reference:

https://docs.getdbt.com/docs/build/materializations

QUESTION: 6

Which is a mandatory property of an metrics resource

Option A :

config

Option B :

timestamp

Option C :

label

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option D :

meta

Correct Answer: C

Explanation/Reference:

https://docs.getdbt.com/docs/build/metrics

QUESTION: 7

Identify valid dbt commands (choose 2)

Option A :

build refresh

Option B :

run

Option C :

run-operation

Option D :

build-operation

Correct Answer: B,C

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Explanation/Reference:

https://docs.getdbt.com/reference/dbt-commands

QUESTION: 8

Choose 2 right combination describing git commands to right use cases 1. commit 2. push 3. merge A. take
the changes from one branch and adds them into another (usually main) branch. B. updates a remote branch
with the commits made to the current branch C. a user’s change to a file (or set of files) identified by a
unique id

Option A :

1 --> C

Option B :

1 --> B

Option C :

3 --> A

Option D :

3 --> C

Correct Answer: A,C

Explanation/Reference:

https://docs.getdbt.com/guides/legacy/best-practices#version-control-your-dbt-project

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
QUESTION: 9

Which 2 are NOT valid property for Exposure

Option A :

type

Option B :

dependent_models

Option C :

owner_name

Option D :

owner

Correct Answer: B,C

Explanation/Reference:

https://docs.getdbt.com/reference/exposure-properties

QUESTION: 10

Which statement best describes snapshot feature in dbt

Option A :

Snapshots implement type-1 Slowly Changing Dimensions

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option B :

Snapshots implement type-2 Slowly Changing Dimensions

Option C :

Snapshot implements fact less facts

Option D :

Snapshot implements incremental data loading strategy

Correct Answer: B

Explanation/Reference:

https://docs.getdbt.com/docs/build/snapshots

QUESTION: 11

Given following .yml, how the model events/mart/model_b.sql will be materialized

name: dbt_labs

models:

dbt_labs:

events:

+enabled: true

+materialized: view

base:

+materialized: table"

Option A :

View

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option B :

Increamental

Option C :

Ephemerea

Option D :

Table

Correct Answer: A

Explanation/Reference:

https://docs.getdbt.com/reference/model-configs

QUESTION: 12

Given the below yaml

sources:

- name: stripe

database: raw

tables:

- name: orders

- name: customers

What is the right compiled code for a model which runs

select *

from {{ source('stripe', 'customers') }}

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option A :

select * from raw.stripe.orders

Option B :

select * from stripe.stripe.customers

Option C :

select * from raw.stripe.customers

Option D :

select * from stripe.stripe.orders

Correct Answer: C

Explanation/Reference:

https://docs.getdbt.com/docs/build/sources

QUESTION: 13

Which is NOT a step of a typical automated dbt workflow 1. models and analysis are downloaded from
multiple source control repositories, 2. code is configured for the given environment, 3. code is tested, and 4.
code is deployed.

Option A :

Only 1

Option B :

All of them

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option C :

None of them

Option D :

1 and 2

Correct Answer: C

Explanation/Reference:

https://docs.getdbt.com/community/resources/viewpoint

QUESTION: 14

Which file is NOT generated by dbt docs generate config --no-compile

Option A :

target/manifest.json

Option B :

Both of them

Option C :

None of them

Option D :

target/catalog.json

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Correct Answer: A

Explanation/Reference:

https://docs.getdbt.com/reference/commands/cmd-docs#dbt-docs-serve

QUESTION: 15

Given following .yml config, how dbt behaves if the environment variables are not set when dbt run is
invoked

profile:

target: prod

outputs:

prod:

type: postgres

host: 127.0.0.1

# IMPORTANT: Make sure to quote the entire Jinja string here

user: "{{ env_var('DBT_USER') }}"

password: "{{ env_var('DBT_PASSWORD') }}"

....

Option A :

dbt throws compilation error

Option B :

dbt produces an warning and continue

Option C :

dbt throws an warning and stops execution

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option D :

dbt throws run time error

Correct Answer: A

Explanation/Reference:

https://docs.getdbt.com/reference/dbt-jinja-functions/env_var

QUESTION: 16

How the SQL will be compiled based on the following model:

{% set payment_methods = ["bank_transfer", "credit_card", "gift_card"] %}

select order_id,

{% for payment_method in payment_methods %}

sum(case when payment_method = '{{payment_method}}' then amount end) as


{{payment_method}}_amount,

{% endfor %}

from {{ ref('raw_payments') }}

group by 1

Option A :

select

order_id,

sum(case when payment_method = 'bank_transfer' then amount end) as bank_transfer_amount

sum(case when payment_method = 'credit_card' then amount end) as credit_card_amount

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
sum(case when payment_method = 'gift_card' then amount end) as gift_card_amount,

from raw_jaffle_shop.payments

group by 1

Option B :

select

order_id,

sum(case when payment_method = 'bank_transfer' then amount end) as bank_transfer_amount

sum(case when payment_method = 'credit_card' then amount end) as credit_card_amount

sum(case when payment_method = 'gift_card' then amount end) as gift_card_amount

from raw_jaffle_shop.payments

group by 1

Option C :

select

order_id,

sum(case when payment_method = 'bank_transfer' then amount end) as bank_transfer_amount

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
sum(case when payment_method = 'credit_card' then amount end) as credit_card_amount

from raw_jaffle_shop.payments

group by 1

Option D :

Compile Error

Correct Answer: A

Explanation/Reference:

https://docs.getdbt.com/docs/get-started/learning-more/using-jinja#use-a-for-loop-in-models-for-repeated-sql

QUESTION: 17

Identify 3 snapshot meta fields

Option A :

dbt_scd_id

Option B :

dbt_valid_to

Option C :

dbt_valid_from

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option D :

dbt_scd_latest

Correct Answer: A,B,C

Explanation/Reference:

https://docs.getdbt.com/docs/build/snapshots

QUESTION: 18

Identify True/False dbt also executes any custom generate_schema_name macros that are part of a package
installed in your project., hence it is important to rename any such macro provided by installed packages

Option A :

TRUE

Option B :

FALSE

Correct Answer: B

Explanation/Reference:

https://docs.getdbt.com/docs/build/custom-schemas#changing-the-way-dbt-generates-a-schema-name

QUESTION: 19

Which is a mandatory property of an Exposure resource

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option A :

url

Option B :

type

Option C :

description

Option D :

maturity

Correct Answer: B

Explanation/Reference:

https://docs.getdbt.com/reference/exposure-properties

QUESTION: 20

Given the following .yml file

name: dbt_labs

models:

dbt_labs:

events:

+enabled: true

+materialized: view

base:

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
+schema: base

And following config are defined in events/base/model_a.sql

{{ config(

schema=analytics

) }}

in which schema the model mart/stripe/model_b.sql will be created

Option A :

It will be an compile error

Option B :

base

Option C :

analytics

Option D :

default schema

Correct Answer: D

Explanation/Reference:

https://docs.getdbt.com/docs/build/custom-schemas

QUESTION: 21

Which function can be used to create automatic dependency between models

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Option A :

ref

Option B :

run

Option C :

from

Option D :

graph

Correct Answer: A

Explanation/Reference:

https://docs.getdbt.com/reference/dbt-jinja-functions/ref

QUESTION: 22

Identify 2 jinja macros available in generate_schema_name

Option A :

source

Option B :

log

Option C :

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
exception

Option D :

tests

Correct Answer: B,C

Explanation/Reference:

https://docs.getdbt.com/docs/build/custom-schemas#jinja-context-available-in-generate_schema_name

QUESTION: 23

Which 2 platforms are supported by dbt

Option A :

Databricks

Option B :

MongoDB

Option C :

Dremio

Option D :

Casandra

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering
Correct Answer: A,C

Explanation/Reference:

https://docs.getdbt.com/docs/supported-data-platforms

https://www.dumpscollege.com/exam/dbt-Analytics-Engineering

You might also like