0% found this document useful (0 votes)
1K views7 pages

DM4ML Quiz

The document contains multiple choice questions about dbt concepts like model configuration files, test folders, commands to run specific tests, and YAML test configuration.

Uploaded by

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

DM4ML Quiz

The document contains multiple choice questions about dbt concepts like model configuration files, test folders, commands to run specific tests, and YAML test configuration.

Uploaded by

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

What file type is used for specifying which generic tests to run by model and column?

Note: All CFUs require 100% to receive the dbt Fundamentals badge.

Choose only ONE best answer.

A
.sql
B
.md
C
.yml
D
.json

What are the four generic tests that dbt ships with?

Choose only ONE best answer.

A
Null, unique, relationships, accepted_values
B
Null, distinct, relationships, accepted_values
C
Not_null, distinct, relationships, accepted_values
D
Not_null, unique, relationships, accepted_values

In what folder should singular tests be saved in your dbt project?

Choose only ONE best answer.

A
data
B
tests
C
models
D
macros

What command would you use to only run tests configured on a source named
my_raw_data?

Choose only ONE best answer.


A
dbt test --my_raw_data
B
dbt source my_raw_data --test
C
dbt test --select sources+my_raw_data
D
dbt test --select source:my_raw_data

Based on the YAML file below, which one of the following statements is true?
models/staging/payments_sources.yml
version: 2

models:
- name: customers
columns:
- name: customer_id
tests:
- not_null
- name: payments
columns:
- name: payment_id
tests:
- unique
- not_null
- name: payment_method
tests:
- accepted_values:
values:
- credit_card
- ach_transfer
- paypal
- name: orders
columns:
- name: order_id
tests:
- unique

Choose only ONE best answer.

A
The accepted values test will fail if none of the values in the payment_method column are
equal to credit_card
B
The accepted values test will fail if one of the values in the payment_method column is
not equal to credit_card, paypal, or ach_transfer
C
The accepted values test will pass if a null value is found in the payment_method column.
D
The accepted values test will pass if one of the values in the payment_method column is
equal to credit_card.

What query would you use to create a singular test to assert that no record in
cool_model has a value in Column A that is less than the value in Column B?

Choose only ONE best answer.

A
select * from {{ ref( ‘cool_model’) }} where Column B < Column A
B
select * from {{ ref( ‘cool_model’) }} where Column A < Column B
C
select * from {{ ref( ‘cool_model’) }} where Column A + Column B = 0
D
select * from {{ ref( ‘cool_model’) }} where Column A != Column B

What is most likely true if a generic test on your sources fails?

Choose only ONE best answer.

A
Your models are taking too long to run
B
Your raw data is not fresh
C
You have a SQL error in your models
D
An assumption about your raw data is no longer true

How do you associate a singular test with a particular dbt model or source?

Choose only ONE best answer.

A
Using the ref or source macro in the SQL query in the singular test file
B
Adding the singular test name to the config block in a model file
C
Adding the singular test name to the tests block in a yml file
D
Using the raw table reference in the custom SQL query
What is the correct way to reference the doc block called ‘orders’, contained in a file
called docs_jaffle_shop.md?

Choose only ONE best answer.

A
description: ‘{{ doc(“orders”) }}’
B
description: {{ docs(“orders”) }}
C
description: {{ doc(“docs_jaffle_shop)”) }}
D
description: ‘{{ doc(“docs_jaffle_shop: orders”) }}’

What command will generate documentation for your project in development?


Note: All CFUs require 100% to receive the dbt Fundamentals badge.

Choose only ONE best answer.

A
dbt docs serve
B
dbt docs run
C
dbt docs generate
D
dbt run --docs

Which one of the following statements is true about documentation in dbt?

Choose only ONE best answer.

A
dbt will automatically write descriptions for models and sources that you don’t define
yourself
B
A developer can only write descriptions for models in the project, but not for sources that
have been loaded by a loader tool
C
dbt will automatically pull descriptions from your dbt project and metadata about your
models and sources into the documentation site
D
Documentation can only be generated in the development interface and not on a
scheduled job
Which one of the following are true about running your dbt project in production?
Note: All CFUs require 100% to receive the dbt Fundamentals badge.

Choose only ONE best answer.

A
Running dbt in production should use a different repository than I used in development
B
Running dbt in production requires the re-configuration of sources to refer to production
data.
C
Running dbt in production should use a different database schema than I used in
development
D
Running dbt in production only supports the `dbt run` command - it does not support
`dbt tes

When does a dbt job run?

Choose only ONE best answer.

A
Every morning at 9 am, in the time zone of your choosing
B
At whatever cadence you set up for the job
C
When developing in the IDE and the command “dbt run” is entered in the command bar
D
Only when you open a pull request
Which one of the following is true about development and deployment
environments?

Choose only ONE best answer.

A
Deployment environments are used for developing code and development environment
are used for running code on a schedule.
B
Deployment environments are used for running code on a schedule and development
environments are used for developing code.
C
Deployment and development environments must use the same version of dbt.
D
Deployment and development environments can both be used for editing code and
running code on a schedule.
After developing models in dbt, which one of the following steps is the final step to
ensure your code runs in production?

Choose only ONE best answer.

A
All tabs in the IDE have been saved.
B
All files have been committed to the current branch
C
I’ve opened a pull request from the dbt Cloud IDE
D
The code has been reviewed and merged into the default branch

dbt test --select source:*


dbt run
dbt test --exclude source:*
If any of the tests on sources fails, how will dbt Cloud handle the rest of the
commands?  

Choose only ONE best answer.

A
dbt will still execute dbt run AND dbt test --exclude source:*
B
dbt will still execute dbt run BUT will not execute dbt test --exclude source:*
C
dbt will still execute dbt test --exclude source:* BUT will not execute dbt run
D
dbt will not execute any further commands

Consider a production job where you have the following commands and have
enabled docs generation.
dbt run
dbt test
What will be the correct order of invoked dbt commands in the run history after
‘clone git repository’ and ‘create profile from connection’?

Choose only ONE best answer.

A
dbt deps >> dbt run >> dbt test >> dbt docs generate
B
dbt docs generate >> dbt deps >> dbt run >>dbt test
C
dbt run >> dbt test >> dbt docs generate >> dbt deps
D
dbt deps >> dbt docs generate >> dbt run >> dbt test

What aspects of the generated DAG can help you understand your data flow?

Choose only ONE best answer.

A
Descriptions of the models listed in the lineage graph help you see exactly what each
model does
B
Dependencies between models can help identify how code is used and possible
redundancies
C
The selector can help narrow the scope of the shown DAG, which allows you to see how
your specific model is used upstream and/or downstream
D
B & C only
E
A, B, & C

You might also like