0
0
dbtdata~20 mins

What is dbt - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
dbt Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding dbt's primary function

What is the main purpose of dbt in data workflows?

AIt visualizes data through dashboards and reports directly.
BIt stores large volumes of raw data in a data lake without transformation.
CIt transforms raw data into clean, tested datasets using SQL and version control.
DIt collects data from external APIs and loads it into databases.
Attempts:
2 left
💡 Hint

Think about what dbt does after data is loaded into a warehouse.

🧠 Conceptual
intermediate
2:00remaining
dbt's role in the ELT process

In the ELT (Extract, Load, Transform) process, where does dbt fit?

AExtracting data from source systems.
BLoading data into the data warehouse.
CVisualizing data for business users.
DTransforming data inside the data warehouse.
Attempts:
2 left
💡 Hint

dbt works after data is already loaded into the warehouse.

data_output
advanced
2:30remaining
dbt model output structure

Given a dbt model that selects customer_id and total_sales from a raw sales table, what will be the structure of the resulting table after running dbt?

dbt
select customer_id, sum(sales_amount) as total_sales from raw_sales group by customer_id
AA table with raw sales data including all columns from raw_sales.
BA table with columns: customer_id, total_sales aggregated by customer.
CA table with only sales_amount column without aggregation.
DAn error because aggregation functions are not allowed in dbt models.
Attempts:
2 left
💡 Hint

dbt models create tables or views based on the SQL query you write.

🔧 Debug
advanced
2:00remaining
Identifying dbt model error

What error will occur when running this dbt model SQL?

select customer_id, total_sales from raw_sales group by customer_id
AError: 'total_sales' is not aggregated or grouped.
BNo error, query runs successfully.
CError: 'customer_id' must be aggregated.
DError: 'raw_sales' table does not exist.
Attempts:
2 left
💡 Hint

Check if all selected columns are either grouped or aggregated.

🚀 Application
expert
3:00remaining
dbt testing output interpretation

After running dbt tests on a model, you see this output:

PASS test_not_null_customer_id (1 passed)
FAIL test_unique_order_id (2 failed)

What does this mean?

AAll customer_id values are present, but order_id has duplicates in 2 rows.
Bcustomer_id has nulls, and order_id is unique.
CBoth customer_id and order_id columns have no issues.
DTests did not run correctly due to syntax errors.
Attempts:
2 left
💡 Hint

Look at what PASS and FAIL indicate for each test.