dbt Setup Guide
Codespaces and local environment
title: “dbt Setup Guide” subtitle: “Codespaces and local environment” —
pyproject.toml installs dbt Core and optional lab packages in the devcontainer. Exercise: dbt covers .env, dbt debug, and the lab — Configure .env.
Lab: Exercise: dbt
Local install (no Codespaces)
Almost every trainee uses GitHub Codespaces (Prerequisites § Step 3). Python, uv, and dbt install automatically when the devcontainer builds — no manual uv install.
Read below only if you are not on Codespaces or a local Dev Container:
| Situation | What to do |
|---|---|
| Normal — fork + Codespace | Stop here — use the Codespace terminal for Module 4 |
| Local clone with GitHub — Option B Native Python (no Docker) | Install Python 3.13+ and uv, then commands below from your clone |
| No GitHub — facilitator-approved Lab source files emergency | Unzip the module bundle, install Python 3.13+ and uv, then run the commands below inside the unzipped folder (same pyproject.toml) |
| Environment | Install uv yourself? |
|---|---|
| GitHub Codespaces or Dev Container | No |
| Native Python (local clone or lab-source ZIP) | Yes — Python 3.13+ and uv first |
If uv is not installed yet (native path only):
macOS or Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Restart the terminal, or:
source $HOME/.local/bin/env
uv --versionWindows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv --versionMore options: uv installation guide.
From your fork root or unzipped lab-source bundle root:
uv pip install --system ".[streaming,ml,notebook]"
dbt --version # dbt-core 1.11.8+, adapters per pyproject.tomlThen follow Exercise: dbt § Configure .env and Exercise: dbt. Local machines: cp dbt_project/profiles.yml.example profiles.yml — see exercise.
Version pins: root pyproject.toml.
Troubleshooting
| Issue | Solution |
|---|---|
uv: command not found |
Native Python path only — install uv (see § Local install); Codespaces/Dev Container users should rebuild the container instead |
dbt not found in Codespace |
Rebuild container or uv pip install --system ".[streaming,ml,notebook]" |
.env / dbt debug fails |
Exercise: dbt § Configure .env |
dbt debug fails on Databricks cross-platform run |
Generated profiles.yml defaults to snowflake — use dbt debug --target databricks for the Databricks lab path |
| Model / test errors | Exercise: dbt · dbt troubleshooting |