0
0
dbtdata~30 mins

dbt project structure - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding dbt Project Structure
📖 Scenario: You are working as a data analyst who wants to organize your data transformation work using dbt (data build tool). You want to create a simple dbt project structure to manage your SQL models and configurations.
🎯 Goal: Build a basic dbt project structure by creating the main folders and files needed to start transforming data with dbt.
📋 What You'll Learn
Create a models folder with a SQL file inside
Create a dbt_project.yml configuration file
Create a profiles.yml file placeholder for connection settings
Understand the purpose of each file and folder in the dbt project
💡 Why This Matters
🌍 Real World
dbt is widely used in data teams to organize and automate data transformations in a clear, maintainable way.
💼 Career
Understanding dbt project structure is essential for data analysts and engineers working with modern data pipelines and analytics workflows.
Progress0 / 4 steps
1
Create the models folder and a SQL model file
Create a folder named models and inside it create a file named my_first_model.sql with the exact content: select 1 as id.
dbt
Need a hint?

The models folder holds your SQL files that define data transformations. Start with a simple SQL file that selects a constant.

2
Create the dbt_project.yml configuration file
Create a file named dbt_project.yml in the root folder with the exact content:
name: 'my_dbt_project' version: '1.0' config-version: 2 profile: 'default' model-paths: ['models']
dbt
Need a hint?

The dbt_project.yml file tells dbt about your project name, version, and where to find your models.

3
Create a placeholder profiles.yml file for connection settings
Create a file named profiles.yml with the exact content:
default: target: dev outputs: dev: type: 'postgres' host: 'localhost' user: 'user' password: 'password' dbname: 'my_database' schema: 'public'
dbt
Need a hint?

The profiles.yml file stores your database connection details. This example uses a local Postgres database.

4
Display the dbt project structure summary
Print the exact text:
Project structure includes models folder with SQL files, dbt_project.yml config file, and profiles.yml connection file.
dbt
Need a hint?

Use a print statement to show the summary text exactly as given.