This document explains how to fully deploy the dbt Analytics project into your BigQuery environment.
- Google Cloud Project with BigQuery enabled
- dbt CLI installed and configured
- Service account JSON key with BigQuery permissions
- Git and basic shell access
git clone https://github.com/tstrall/analytics.git
cd analyticsEdit ~/.dbt/profiles.yml to include:
devtarget for models (e.g.,dbt_tstralldataset)seed_rawtarget for seeds (e.g.,dev_rawdataset)
Test connection:
dbt debugRun the deployment script:
./deploy.shThe script will:
- Seed raw data into
dev_raw - Test the seeds
- Build models into
dbt_tstrall - Test the models
- Generate fresh documentation
If you prefer to run manually:
# Seed raw data
dbt --target seed_raw seed
# Test seeds
dbt --target seed_raw test --select path:seeds/
# Build models
dbt run
# Test models
dbt test --select path:models/
# Generate docs
dbt docs generate
# Serve docs
dbt docs serve- Documentation will be viewable locally at http://localhost:8080
- Separate targets (
devvsseed_raw) ensure clean separation between raw ingestion and model builds. - No secrets or credentials are stored in the GitHub repository.
Built by Ted Strall — strall.com