📘Introduction

When working with dbt (data build tool), YAML files are the backbone of your project’s configuration. They define how dbt behaves, how your models connect to data sources, and how metadata, documentation, and tests are managed. Understanding these YAML files and knowing where they are located within your dbt project is key to mastering dbt fundamentals.

💡
🎓 Preparing for dbt Analytics Engineering Certification?
Check out our exam study guide packed with practical examples and hands-on tutorials:

➡️📕 dbt Analytics Engineering Certification Guide

💡 What is a YAML file?

YAML (“Yet Another Markup Language” or “YAML Ain’t Markup Language”) is a human-readable data-serialization format commonly used for configuration files.

In dbt, YAML is used to define, for example:

  • Project configuration – paths, materializations, dependencies
  • Connection to your warehouse – databases, schemas, environments (dev, prod)
  • Packages – external dbt packages and dependencies
  • Data sources – sources, tables, descriptions, freshness tests
  • Model metadata – descriptions, versioning, tags, data tests, data contacts

By separating configuration from SQL logic, YAML serves as the backbone of project configuration and documentation, helping maintain clarity, structure, and scalability in analytics engineering projects. This makes it easier for teams to collaborate effectively and maintain high-quality, well-documented data pipelines.

🔎 Which YAML files exist in a dbt project?

Here are the main YAML files you’ll encounter in a typical dbt project:

1️⃣ dbt_project.yml

📝 Description
Defines the core configuration of your dbt project. It specifies the project name, version, and default materializations for your models. This file also sets folder paths for models, analyses, seeds, snapshots, macros, and tests.

📍Location
Root directory of your dbt project

💻 Example

name: 'dlnerds_university'
version: '1.0.0'
profile: 'dlnerds_university'

model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

clean-targets:
  - "target"
  - "dbt_packages"

models:
  dlnerds_university:
    +materialized: view

2️⃣ profiles.yml

📝 Description
Stores connection details for your data warehouse and the environments (e.g., dev, prod).

📍Location
Typically in your home directory (~/.dbt/profiles.yml)

💻 Example

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In