dbt_project.yml is the project config file at the root of a dbt project. It tells dbt the project name, where folders live, default configs, and project-level variables.
Typical contents
name: my_analytics
version: 1.0.0
config-version: 2
profile: my_analytics # which profile in profiles.yml
model-paths: ["models"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
test-paths: ["tests"]
analysis-paths: ["analyses"]
models:
my_analytics:
staging:
+materialized: view
+schema: staging
marts:
+materialized: table
vars:
start_date: "2020-01-01"What it controls
- Project name and which
profileto use - Paths for models, seeds, macros, tests, snapshots
- Default materializations / schemas / tags by folder
- Project
vars(overridable on the CLI) - Package install behavior (with
packages.ymlseparately)
Mental model
dbt_project.yml = "how this repo is organized and defaulted" profiles.yml = "how to connect to warehouses / environments"
Interview tip: dbt_project.yml is committed to git. Connection credentials are not stored here; they live in profiles.yml (or env-driven equivalents) outside the project or via secrets.