Goal
Complete the OpenAddresses story in examples/supabase_bigquery_mailing_list (652bf2f) with a scheduled ingestion path: a Python staging loader deployed on GCP Cloud Run Jobs, fired by Cloud Scheduler, feeding the example's existing type: "import" action.
Architecture (division of labor)
Cloud Scheduler (cron, e.g. weekly)
│
▼
Cloud Run Job: load_openaddresses (Python container)
│ download region/state from OpenAddresses.io → unzip → normalize filename
▼
gs://<staging-bucket>/openaddresses/<region>.csv ← staging only; NO warehouse credentials
│
▼
sqlanvil import action (location: gs://…, format: csv) ← already in the example
│ run on a SQLAnvil Cloud workflow cron (or local `sqlanvil run`)
▼
oa_ext.openaddresses_us → stg_addresses → addresses_cache → mailing_list
Key property: the Python job only stages files — it never holds database credentials. The warehouse load + downstream models + assertions run through the normal sqlanvil workflow with run history.
Deliverables
Notes
- Deploy pattern mirrors the existing SQLAnvil Cloud runner (Cloud Run Jobs, image via Cloud Build), so no new platform concepts.
- Keep the loader minimal: stage the standard 11-column CSV as-is; normalization stays in
stg_addresses (SQL), not Python.
- Adapted from a production BigQuery ingestion plan (staged load, clustered target) — here the sqlanvil import + Postgres composite indexes fill those roles.
Goal
Complete the OpenAddresses story in
examples/supabase_bigquery_mailing_list(652bf2f) with a scheduled ingestion path: a Python staging loader deployed on GCP Cloud Run Jobs, fired by Cloud Scheduler, feeding the example's existingtype: "import"action.Architecture (division of labor)
Key property: the Python job only stages files — it never holds database credentials. The warehouse load + downstream models + assertions run through the normal sqlanvil workflow with run history.
Deliverables
examples/supabase_bigquery_mailing_list/loader/—load_openaddresses.py(region/state arg, download from OpenAddresses, unzip, upload to GCS),Dockerfile,requirements.txtgcloud builds submit→gcloud run jobs create→gcloud scheduler jobs create http(job execution via OIDC), incl. required IAM (storage.objectAdmin on the staging bucket, run.invoker for the scheduler SA)storage:credentials entry forgs://in.df-credentials.jsonimport.locationfrom the bundled sample CSV to the stagedgs://URI (Cloud-compatible — hosted runs reject local paths)Notes
stg_addresses(SQL), not Python.