0
0
dbtdata~15 mins

Column descriptions in dbt - Mini Project: Build & Apply

Choose your learning style9 modes available
Adding Column Descriptions in dbt
📖 Scenario: You are working on a data project using dbt. Your team wants to make the data models easier to understand by adding clear descriptions to each column in the model.
🎯 Goal: You will add column descriptions to a dbt model's schema.yml file. This helps everyone know what each column means without guessing.
📋 What You'll Learn
Create a dbt model schema.yml file with a model named orders
Add column descriptions for the columns order_id, customer_id, and order_date
Use the exact description texts provided in the instructions
💡 Why This Matters
🌍 Real World
In real data projects, adding column descriptions makes data models easier to understand and maintain by everyone on the team.
💼 Career
Data analysts and engineers often write and maintain dbt models with clear documentation to improve collaboration and data quality.
Progress0 / 4 steps
1
Create the initial schema.yml file with the model name
Create a file named schema.yml and define a model with the name orders inside the models list.
dbt
Need a hint?

Start by writing version: 2 at the top, then add models: and define the model name orders.

2
Add columns list with column names
Inside the orders model, add a columns list with the column names order_id, customer_id, and order_date. Do not add descriptions yet.
dbt
Need a hint?

List each column under columns: with - name: column_name.

3
Add descriptions to each column
Add a description field for each column with these exact texts: order_id: "Unique ID for each order", customer_id: "ID of the customer who placed the order", order_date: "Date when the order was placed".
dbt
Need a hint?

Indent the description under each column name and use the exact text given.

4
Display the final schema.yml content
Print the entire content of the schema.yml file as a string.
dbt
Need a hint?

Use a print statement with triple quotes to show the full YAML content exactly.