0
0
dbtdata~10 mins

dbt_project.yml configuration - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - dbt_project.yml configuration
Start: Create dbt_project.yml
Define project name
Set version
Configure profile name
Set source-paths
Set target-path
Configure models settings
Save and run dbt
End
This flow shows how you create and configure the dbt_project.yml file step-by-step to set up your dbt project.
Execution Sample
dbt
name: 'my_dbt_project'
version: '1.0'
profile: 'default'
source-paths: ['models']
target-path: 'target'
models:
  my_dbt_project:
    +materialized: view
This config sets the project name, version, profile, source and target paths, and model materialization to view.
Execution Table
StepConfig KeyValue SetEffect
1name'my_dbt_project'Sets the project name
2version'1.0'Defines project version
3profile'default'Links to profile for DB connection
4source-paths['models']Where dbt looks for model files
5target-path'target'Where compiled files are saved
6models.my_dbt_project.+materializedviewSets models to materialize as views
7Run dbtN/Adbt uses this config to build models
💡 All config keys set, dbt ready to run with these settings
Variable Tracker
Config KeyInitialSet ValueFinal
nameNone'my_dbt_project''my_dbt_project'
versionNone'1.0''1.0'
profileNone'default''default'
source-pathsNone['models']['models']
target-pathNone'target''target'
models.my_dbt_project.+materializedNoneviewview
Key Moments - 3 Insights
Why do we set 'profile' in dbt_project.yml?
The 'profile' key tells dbt which database connection settings to use, linking to your profiles.yml file. See execution_table step 3.
What happens if 'source-paths' is set incorrectly?
dbt won't find your model files and won't build them. This is shown in execution_table step 4 where source-paths is set to ['models'].
Why do we use '+materialized: view' under models?
This sets all models in the project to be materialized as views instead of tables. See execution_table step 6.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what value is set for 'profile' at step 3?
A'default'
B'my_dbt_project'
C'1.0'
D'target'
💡 Hint
Check the 'Value Set' column in execution_table row with Step 3
At which step does the configuration specify where dbt looks for model files?
AStep 6
BStep 2
CStep 4
DStep 5
💡 Hint
Look for 'source-paths' in the Config Key column of execution_table
If you change '+materialized' from 'view' to 'table', which step in execution_table changes?
AStep 3
BStep 6
CStep 4
DStep 5
💡 Hint
Check the step where '+materialized' is set in execution_table
Concept Snapshot
dbt_project.yml configures your dbt project.
Key settings: name, version, profile (DB connection), source-paths (model files), target-path (compiled files).
Models section sets how models build (e.g., materialized as views or tables).
Save and run dbt to apply these settings.
Full Transcript
This visual execution shows how to configure the dbt_project.yml file step-by-step. First, you set the project name and version. Then, you specify the profile to connect to your database. Next, you tell dbt where to find your model files with source-paths and where to save compiled files with target-path. Finally, you configure model settings like materialization type. Each step updates the configuration variables. When all are set, dbt uses this file to build your project models correctly.