0
0
dbtdata~20 mins

Data mesh patterns with dbt - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Data Mesh dbt Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of this dbt model run?
Given the following dbt model SQL, what will be the resulting table's row count if the source table has 1000 rows with 200 rows having status = 'active'?
dbt
select * from {{ ref('source_table') }} where status = 'active'
A1000 rows
B200 rows
C800 rows
D0 rows
Attempts:
2 left
💡 Hint

Think about the filter condition in the SQL query.

data_output
intermediate
2:00remaining
What is the resulting column in this dbt model?
This dbt model adds a new column 'is_high_value' based on amount. What will be the values for amount 50 and 150?
dbt
select
  id,
  amount,
  case when amount > 100 then true else false end as is_high_value
from {{ ref('orders') }}
AFor 50: false, For 150: true
BFor 50: true, For 150: false
CFor 50: true, For 150: true
DFor 50: false, For 150: false
Attempts:
2 left
💡 Hint

Check the condition amount > 100 carefully.

🔧 Debug
advanced
2:00remaining
Why does this dbt model fail to compile?
This dbt model SQL throws a compilation error. Identify the cause.
dbt
select id, amount
from {{ ref('orders') }}
where amount > 100
AMissing closing brace in ref function
BMissing comma between columns
CIncorrect table name in ref
DInvalid where clause syntax
Attempts:
2 left
💡 Hint

Check the syntax of the Jinja ref function.

🚀 Application
advanced
2:00remaining
Which dbt pattern supports decentralized data ownership in data mesh?
In data mesh, teams own their data domains. Which dbt pattern best supports this principle?
ACentralizing all models in one dbt project
BUsing a single schema for all data
CUsing separate dbt projects per domain
DAvoiding version control for models
Attempts:
2 left
💡 Hint

Think about how to isolate domain ownership in dbt.

🧠 Conceptual
expert
2:00remaining
What is the main benefit of using dbt's source freshness feature in a data mesh?
Why is source freshness important when implementing data mesh patterns with dbt?
AIt disables incremental model builds
BIt automatically fixes data quality issues in source tables
CIt merges all domain data into a single table
DIt ensures data domains publish timely and reliable data for consumers
Attempts:
2 left
💡 Hint

Consider how freshness impacts trust in shared data.