Quick Start Guide¶
Get up and running with BuildCPG Labs in 10 minutes.
Prerequisites¶
- Python 3.11+
- Mac 11+ or Linux
- Git
- Basic terminal knowledge
Installation¶
1. Clone Repository¶
2. Install Dependencies¶
3. Verify Setup¶
Your First Lab Run¶
Setup Lab1 (One Time)¶
Run the Pipeline¶
Inspect Your Data¶
Run Tests¶
Create a New Lab¶
Bootstrap Lab2¶
Use Lab2 Immediately¶
Common Commands¶
Working on Lab1¶
cd lab1_sales_performance
make setup # Initialize lab (one time)
make run # Run dbt pipeline
make test # Run dbt tests
make inspect # Check data quality
make clean # Clean build artifacts
make docs # Generate dbt documentation
Across All Labs¶
# Check all labs
ls -la | grep lab
# Status of each lab
cat config/labs_config.yaml
# Check paths
python config/paths.py
What Happened?¶
When you ran make setup in lab1:
- Created venv - Isolated Python environment
- Installed dependencies - From requirements.txt
- Ran dbt debug - Verified dbt setup
When you ran make run:
- Activated venv - Automatically (no need for
source venv/bin/activate) - Changed to dbt directory -
cd dbt - Ran dbt run - Executed transformation pipeline
- Created/updated tables - In DuckDB database
When you ran make inspect:
- Connected to database - lab1_sales_performance.duckdb
- Listed all schemas - raw, raw_bronze, raw_gold, raw_silver
- Showed table stats - Row counts, column counts
- Calculated quality - Checked for nulls, duplicates
Next Steps¶
- Read Lab Structure to understand directory layout
- Read Shared vs Lab-Specific to understand how code is organized
- Read Creating New Lab for detailed lab creation guide
- Read Troubleshooting if you hit any issues
Troubleshooting¶
"command not found: make"¶
You need to install make. On Mac:
"venv not found"¶
Run make setup first to create the virtual environment.
"dbt: command not found"¶
Make sure you ran make setup to install dbt in the venv.
For more help, see Troubleshooting.