0
0
dbtdata~10 mins

Doc blocks for reusable descriptions 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 doc block named 'customer_desc'.

dbt
docs:
  [1]:
    description: "Description for customer table."
Drag options to blanks, or click blank then click option'
Acustomer_doc
Bdesc_customer
Ccustomer_description
Dcustomer_desc
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces or special characters in the doc block name.
Using a name that does not match the reference later.
2fill in blank
medium

Complete the code to reference the doc block 'customer_desc' in a model's description.

dbt
models:
  customer:
    description: '{{{{ doc([1]) }}}}'
Drag options to blanks, or click blank then click option'
A"customer_desc"
Bcustomer_desc
C'customer_desc'
D"customer_doc"
Attempts:
3 left
💡 Hint
Common Mistakes
Adding quotes inside the doc() function.
Using a different doc block name than defined.
3fill in blank
hard

Fix the error in the doc block definition by completing the missing key.

dbt
docs:
  customer_desc:
    [1]: "Description for customer table."
Drag options to blanks, or click blank then click option'
Adescription
Bdesc
Cdoc
Ddetails
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect keys like 'desc' or 'doc'.
Misspelling 'description'.
4fill in blank
hard

Fill both blanks to create a reusable doc block and reference it in a model.

dbt
docs:
  [1]:
    description: "Reusable description for orders."

models:
  orders:
    description: '{{{{ doc([2]) }}}}'
Drag options to blanks, or click blank then click option'
Aorders_desc
Border_description
Dorders_doc
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for the doc block and reference.
Misspelling the doc block name.
5fill in blank
hard

Fill all three blanks to define two doc blocks and reference one in a model.

dbt
docs:
  [1]:
    description: "Description for customers."
  [2]:
    description: "Description for products."

models:
  products:
    description: '{{{{ doc([3]) }}}}'
Drag options to blanks, or click blank then click option'
Acustomer_desc
Bproduct_desc
Dcustomer_description
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up doc block names.
Referencing a doc block not defined.