0
0
dbtdata~20 mins

Column descriptions in dbt - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Column Description Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Purpose of column descriptions in dbt

What is the main purpose of adding column descriptions in a dbt model?

ATo provide clear explanations of what each column represents for better understanding and documentation.
BTo change the data type of the column during model compilation.
CTo automatically generate SQL queries for data transformation.
DTo enforce data validation rules on the column values.
Attempts:
2 left
💡 Hint

Think about why documentation is important in data projects.

Predict Output
intermediate
1:30remaining
Output of dbt column description YAML snippet

Given the following dbt schema YAML snippet, what will be the description of the customer_id column in the generated documentation?

dbt
models:
  - name: orders
    columns:
      - name: customer_id
        description: "Unique identifier for each customer"
A"Primary key for orders table"
B"Unique identifier for each customer"
C"Date when the order was placed"
D"Total amount of the order"
Attempts:
2 left
💡 Hint

Look at the description field under the customer_id column.

data_output
advanced
1:30remaining
Effect of missing column descriptions in dbt docs

What will be the output in the dbt documentation site for a column that has no description provided in the schema YAML?

AThe data type of the column shown instead of description.
BAn error message preventing documentation generation.
CThe column name repeated as the description automatically.
D"No description provided" or blank space under the column description section.
Attempts:
2 left
💡 Hint

Consider how dbt handles optional documentation fields.

🔧 Debug
advanced
2:00remaining
Identify the error in this dbt column description YAML

Which option contains a syntax error that will cause dbt to fail when parsing this column description YAML?

dbt
models:
  - name: sales
    columns:
      - name: sale_date
        description: "Date of the sale"
      - name: amount
        description "Total sale amount"
AIncorrect indentation for the 'sale_date' column description.
BUsing double quotes instead of single quotes for descriptions.
CMissing colon after 'description' for the 'amount' column.
DMissing dash before the 'amount' column name.
Attempts:
2 left
💡 Hint

Look carefully at the line defining the description for the 'amount' column.

🚀 Application
expert
2:30remaining
Using column descriptions to improve data quality communication

You want to use column descriptions in dbt to communicate data quality expectations for a status column that only accepts values 'active', 'inactive', or 'pending'. Which description best achieves this goal?

A"Status of the user account; valid values are 'active', 'inactive', or 'pending'."
B"User account status."
C"Contains various status codes."
D"Indicates if the user is logged in or not."
Attempts:
2 left
💡 Hint

Think about how to clearly communicate allowed values in documentation.