Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is dbt_project.yml?

dbt · dbt Fundamentals

What is dbt_project.yml?

Easydbt-08
dbt_project.ymlconfigurationproject

Question

What is dbt_project.yml, and what does it configure?

Solution

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 profile to 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.yml separately)

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.

PreviousNext