dbt requires packages specified in packages.yml to be installed
before running models. Added dbt deps step to the pipeline.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use .venv/bin/dbt if available, fall back to system dbt
- Show both stdout and stderr on dbt failures for better debugging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
load_dotenv() was searching from cwd, which may not be the project root.
Now explicitly passes PROJECT_ROOT / ".env" path.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
dbt uses env_var() in profiles.yml to read POSTGRES_PASSWORD,
but subprocess.run() doesn't automatically load .env files.
Added python-dotenv to load credentials before dbt runs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename profiles.yml.example to profiles.yml (uses env vars, safe to commit)
- Add --profiles-dir flag to dbt commands in load_toronto_data.py
- Add --profiles-dir flag to dbt targets in Makefile
This fixes the "Path '~/.dbt' does not exist" error when running make load-data.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add StatCan CMHC parser to fetch rental data from Statistics Canada API
- Create year spine (2014-2025) as time dimension driver instead of census
- Add CMA-level rental and income intermediate models
- Update mart_neighbourhood_overview to use rental years as base
- Fix neighbourhood_service queries to match dbt schema
- Add CMHC data loading to pipeline script
Data now flows correctly: 158 neighbourhoods × 12 years = 1,896 records
Rent data available 2019-2025, crime data 2014-2024
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>