0
0
dbtdata~10 mins

Query profiling and optimization 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 enable query profiling in dbt.

dbt
profile: [1]
Drag options to blanks, or click blank then click option'
Aenabled
Bdisabled
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'disabled' or 'false' which turns profiling off.
Using 'true' which is not the correct keyword here.
2fill in blank
medium

Complete the code to set the query timeout in dbt.

dbt
query_timeout: [1]
Drag options to blanks, or click blank then click option'
A30
B60
C0
D300
Attempts:
3 left
💡 Hint
Common Mistakes
Setting timeout to 0 which disables timeout.
Setting too low a value causing premature query stops.
3fill in blank
hard

Fix the error in the dbt model config to enable incremental materialization with query optimization.

dbt
config(materialized='[1]')
Drag options to blanks, or click blank then click option'
Aephemeral
Btable
Cview
Dincremental
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table' or 'view' which do not support incremental logic.
Using 'ephemeral' which is for temporary models.
4fill in blank
hard

Fill both blanks to create a dbt model that filters rows and orders results for optimization.

dbt
select * from [1] where [2] > 100 order by created_at desc
Drag options to blanks, or click blank then click option'
Asource_table
Bid
Cscore
Duser_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using a column name in place of the table name.
Filtering on an ID column which may not optimize well.
5fill in blank
hard

Fill all three blanks to write a dbt model that aggregates data with grouping and filtering for optimization.

dbt
select [1], count(*) as total from [2] where [3] > 50 group by [1]
Drag options to blanks, or click blank then click option'
Acategory
Bevents
Cduration
Duser_id
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up table and column names.
Using a non-numeric column for filtering.