This guide will walk you through setting up your local development environment for the Modern Data Stack Bootcamp.
- Installing Python
- Setting Up Virtual Environment
- Installing Dependencies
- Configuring dbt
- Downloading Chinook Database
- Running Your First dbt Command
- Troubleshooting
First, verify you have Python 3.9 or higher:
python --versionIf you need to install or upgrade Python:
- macOS: Use Homebrew:
brew install python@3.11 - Windows: Download from python.org
- Linux: Use your package manager:
sudo apt install python3.9
A virtual environment isolates your project dependencies:
# Navigate to project directory
cd modern-data-stack-bootcamp
# Create virtual environment
python -m venv venvmacOS/Linux:
source venv/bin/activateWindows:
venv\Scripts\activateYou should see (venv) in your terminal prompt.
With your virtual environment activated, install the requirements:
pip install -r requirements.txtThis will install:
- DuckDB
- dbt-core and dbt-duckdb
- Great Expectations
- pandas, matplotlib
- jupyter
mkdir -p ~/.dbtWindows users: Replace ~/.dbt with %USERPROFILE%\.dbt
Copy the example profiles file:
cp profiles.yml.example ~/.dbt/profiles.ymlEdit ~/.dbt/profiles.yml and update the path:
bootcamp:
outputs:
dev:
type: duckdb
path: '/absolute/path/to/bootcamp.duckdb' # Update this path
extensions:
- sqlite_scanner
target: devThe Chinook database is a sample SQLite database. You can download it:
# Using curl (macOS/Linux)
curl -O https://github.com/lerocha/chinook-database/raw/master/ChinookDatabase/DataSources/Chinook_Sqlite.sqlite
# Using wget (Linux)
wget https://github.com/lerocha/chinook-database/raw/master/ChinookDatabase/DataSources/Chinook_Sqlite.sqliteOr visit: https://github.com/lerocha/chinook-database
If this is your first dbt project in the directory:
dbt init(You can skip this if the directory structure already exists.)
Run dbt debug to check your setup:
dbt debugYou should see output like:
Running with dbt=1.7.0
dbt version: 1.7.0
python version: 3.11.0
python path: /path/to/python
os info: macOS-13.0.0
Using profiles dir at /Users/you/.dbt
Using profiles.yml file at /Users/you/.dbt/profiles.yml
Configuration:
profiles.yml file [OK found and valid]
dbt_project.yml file [OK found and valid]
Required dependencies:
- git [OK found]
Connection:
Connection: "bootcamp" has been tested.
All checks passed!
Problem: dbt: command not found or dbt: No such file or directory
Solution:
- Make sure your virtual environment is activated
- Reinstall dbt:
pip install dbt-core dbt-duckdb
Problem: Catalog Error: Failed to initialize
Solution:
- Verify your DuckDB file path in
profiles.ymlis correct - Make sure the database file exists at that location
- Check that you have read permissions on the file
Problem: ImportError: cannot import name 'dbt' from 'dbt.adapters.duckdb'
Solution:
pip uninstall dbt-duckdb
pip install dbt-duckdbOnce setup is complete:
- Open the Phase 0 notebook:
phase_0_modern_data_stack.ipynb - Follow along with the instructional videos
- Complete the TODO exercises
- Build your first dbt models!
If you're still stuck:
- Check the Troubleshooting Guide
- Review common issues in our FAQ
- Ask in the course discussion forum
Good luck! 🚀