0
0
dbtdata~10 mins

Model dependencies and parallelism in dbt - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a model that depends on another model using the ref function.

dbt
select * from [1]('customers')
Drag options to blanks, or click blank then click option'
Aref
Bsource
Ctable
Dmodel
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'source' instead of 'ref' to link models.
Trying to use 'table' or 'model' which are not dbt functions.
2fill in blank
medium

Complete the command to run dbt models with 4 threads for parallel execution.

dbt
dbt run --[1] 4
Drag options to blanks, or click blank then click option'
Aparallel
Bjobs
Cthreads
Dworkers
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--jobs' or '--workers' which are not valid dbt flags.
Confusing parallelism flag with other options.
3fill in blank
hard

Fix the error in the model dependency by completing the missing function.

dbt
select * from [1]('orders')
Drag options to blanks, or click blank then click option'
Asource
Bload
Cfetch
Dref
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'source' which refers to external tables, not models.
Using 'load' or 'fetch' which are not dbt functions.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that filters models with run time greater than 10 seconds.

dbt
filtered_models = {model: time[1]2 for model, time in run_times.items() if time [2] 10}
Drag options to blanks, or click blank then click option'
A**
B>
C>=
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using '**' instead of '*' for multiplication.
Using '>=' instead of '>' which changes the filter condition.
5fill in blank
hard

Fill all three blanks to create a dictionary of model names in uppercase with their run times filtered by greater than 5 seconds.

dbt
result = [1]: [2] for [3], time in run_times.items() if time > 5
Drag options to blanks, or click blank then click option'
Amodel.upper()
Btime
Cmodel
Dtime.upper()
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'time.upper()' which is invalid since time is numeric.
Swapping model and time in the comprehension.