0
0
dbtdata~10 mins

Documenting models in YAML 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 description in YAML.

dbt
models:
  - name: customers
    description: [1]
Drag options to blanks, or click blank then click option'
Acustomer_data
B"This model contains customer data"
Ccustomers_table
Dmodel_description
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the description string.
Using a variable name instead of a description.
2fill in blank
medium

Complete the code to add a column description in the model YAML.

dbt
models:
  - name: orders
    columns:
      - name: order_id
        description: [1]
Drag options to blanks, or click blank then click option'
Aid_order
Border_identifier
C"Unique identifier for each order"
Dorder_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using the column name as the description.
Leaving the description empty.
3fill in blank
hard

Fix the error in the YAML snippet by completing the description field correctly.

dbt
models:
  - name: products
    description: [1]
Drag options to blanks, or click blank then click option'
AList of products
B"List of products
CList of products"
D"List of products"
Attempts:
3 left
💡 Hint
Common Mistakes
Using unmatched quotes causing YAML parsing errors.
Not quoting strings with spaces.
4fill in blank
hard

Fill both blanks to add a model and a column description in YAML.

dbt
models:
  - name: [1]
    columns:
      - name: [2]
        description: "Customer's email address"
Drag options to blanks, or click blank then click option'
Acustomers
Bemail
Corders
Dorder_date
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing model and column names incorrectly.
Using unrelated names that don't match the description.
5fill in blank
hard

Fill all three blanks to document a model with two columns and their descriptions in YAML.

dbt
models:
  - name: [1]
    description: "Sales data model"
    columns:
      - name: [2]
        description: "Unique sale identifier"
      - name: [3]
        description: "Date of the sale"
Drag options to blanks, or click blank then click option'
Asales
Bsale_id
Csale_date
Dcustomer_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using column names that don't match the descriptions.
Confusing customer_id with sale_id or sale_date.