This is a project for M2 BI, featuring infrastructure as code using Terraform/OpenTofu for GCP resources and dbt for data transformation.
Detailed prerequisites and step-by-step deployment instructions now live in infrastructure/README.md.
- dbt: Use the generated
dbt/profiles.ymlfor development and production environments. - BigQuery: Access the dev and prod datasets as specified in the Terraform outputs.
-
Install uv to manage the Python environment described by
pyproject.tomlanduv.lock. -
Run commands inside the managed environment with
uv run, which keeps the virtual environment and lockfile in sync automatically. For example:uv run scripts/generate_profiles.py uv run -- dbt debug
-
If you prefer to activate the virtual environment manually, first synchronize dependencies and then source
.venv:uv sync source .venv/bin/activate dbt debugSee the uv running commands guide for more patterns.
Lock requirements with
uv pip compile pyproject.toml -o requirements.txt.
- Service account keys are not committed to version control (ignored in
.gitignore). - For production deployments, consider using CI/CD pipelines with secure credential management.