# pass-culture/data-gcp architecture

> Architecture diagram of the GitHub repository pass-culture/data-gcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pass-culture/data-gcp
- Repository: https://github.com/pass-culture/data-gcp

## Overview

Data GCP is Pass Culture’s GCP data-engineering platform. Its principal workflow is scheduled orchestration of ETL and ML work, with results feeding cloud data stores or model services. Distinct capabilities include external-source ingestion, internal data movement and administration, model training and serving, and reporting and Metabase governance. The README establishes these product areas; the sampled source shows specific retrieval API dispatch, finance forecasting, reporting, and Airflow support behavior. Many individual jobs are represented by their existing subsystem directories because their implementations were not sampled.

Main entry points: [`orchestration/dags`](https://github.com/pass-culture/data-gcp/tree/master/orchestration/dags) (Airflow DAGs), [`jobs/etl_jobs/external`](https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/external) (External ETL), [`jobs/etl_jobs/internal`](https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/internal) (Internal data jobs), [`jobs/ml_jobs/finance/main.py`](https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/finance/main.py) (Finance forecasting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Workflow orchestration"]
  node_airflow["Airflow DAGs"]
  node_airflow_common["Airflow support"]
end

subgraph group_etl["ETL and data jobs"]
  node_external_etl["External ETL"]
  node_internal_etl["Internal data jobs"]
end

subgraph group_ml["Machine learning"]
  node_ml_training["ML training jobs"]
  node_finance_forecast["Finance forecasting<br/>[main.py]"]
  node_retrieval_api["Retrieval API<br/>[routes.py]"]
  node_retrieval_handlers["Prediction handlers<br/>[handler_factory.py]"]
end

subgraph group_reporting["Reporting and governance"]
  node_reporting_cli["Report generation CLI<br/>[main.py]"]
  node_reporting_core["Report processing<br/>[core.py]"]
  node_reporting_services["Report services"]
  node_metabase_migration["Metabase migration<br/>[main.py]"]
  node_metabase_governance["Metabase governance<br/>[main.py]"]
end

node_operator(("Platform operator"))
node_source_apis{{"External data sources"}}
node_bigquery[("BigQuery")]
node_cloud_storage[("GCS")]
node_drive{{"Google Drive"}}
node_metabase{{"Metabase"}}
node_mlflow{{"MLflow"}}
node_vector_store[("Vector database")]

node_operator -.->|"operates"| node_airflow
node_airflow -->|"uses support"| node_airflow_common
node_airflow -.->|"orchestrates jobs"| node_external_etl
node_airflow -.->|"orchestrates jobs"| node_internal_etl
node_airflow -.->|"orchestrates jobs"| node_ml_training
node_external_etl -.->|"extracts data"| node_source_apis
node_external_etl -.->|"loads data"| node_bigquery
node_internal_etl -.->|"moves data"| node_bigquery
node_internal_etl -.->|"uses storage"| node_cloud_storage
node_reporting_cli -->|"runs reports"| node_reporting_core
node_reporting_cli -->|"uses services"| node_reporting_services
node_reporting_services -.->|"uploads reports"| node_drive
node_metabase_migration -->|"migrates content"| node_metabase
node_metabase_governance -.->|"governs content"| node_metabase
node_metabase_migration -->|"logs results"| node_bigquery
node_finance_forecast -->|"logs runs"| node_mlflow
node_finance_forecast -->|"saves forecasts"| node_bigquery
node_ml_training -.->|"uses data"| node_bigquery
node_retrieval_api -->|"dispatches requests"| node_retrieval_handlers
node_retrieval_handlers -.->|"retrieves items"| node_vector_store

click node_airflow "https://github.com/pass-culture/data-gcp/tree/master/orchestration/dags"
click node_airflow_common "https://github.com/pass-culture/data-gcp/tree/master/orchestration/dags/common"
click node_external_etl "https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/external"
click node_internal_etl "https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/internal"
click node_reporting_cli "https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/external_reporting/main.py"
click node_reporting_core "https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/external_reporting/core.py"
click node_reporting_services "https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/external/external_reporting/services"
click node_metabase_migration "https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/metabase/main.py"
click node_metabase_governance "https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/metabase-governance/main.py"
click node_ml_training "https://github.com/pass-culture/data-gcp/tree/master/jobs/ml_jobs"
click node_finance_forecast "https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/finance/main.py"
click node_retrieval_api "https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/retrieval_vector/app/routes.py"
click node_retrieval_handlers "https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/retrieval_vector/app/factory/handler_factory.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_airflow,node_airflow_common toneBlue
class node_external_etl,node_internal_etl,node_bigquery,node_cloud_storage,node_vector_store toneAmber
class node_ml_training,node_finance_forecast,node_retrieval_api,node_retrieval_handlers toneMint
class node_reporting_cli,node_reporting_core,node_reporting_services,node_metabase_migration,node_metabase_governance toneRose
class node_operator,node_source_apis,node_drive,node_metabase,node_mlflow toneIndigo
```

## Components

### Workflow orchestration

- [Airflow DAGs](https://github.com/pass-culture/data-gcp/tree/master/orchestration/dags): `orchestration/dags`
- [Airflow support](https://github.com/pass-culture/data-gcp/tree/master/orchestration/dags/common): `orchestration/dags/common`

### ETL and data jobs

- [External ETL](https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/external): `jobs/etl_jobs/external`
- [Internal data jobs](https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/internal): `jobs/etl_jobs/internal`

### Machine learning

- [ML training jobs](https://github.com/pass-culture/data-gcp/tree/master/jobs/ml_jobs): `jobs/ml_jobs`
- [Finance forecasting](https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/finance/main.py): `jobs/ml_jobs/finance/main.py`
- [Retrieval API](https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/retrieval_vector/app/routes.py): `jobs/ml_jobs/retrieval_vector/app/routes.py`
- [Prediction handlers](https://github.com/pass-culture/data-gcp/blob/master/jobs/ml_jobs/retrieval_vector/app/factory/handler_factory.py): `jobs/ml_jobs/retrieval_vector/app/factory/handler_factory.py`

### Reporting and governance

- [Report generation CLI](https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/external_reporting/main.py): `jobs/etl_jobs/external/external_reporting/main.py`
- [Report processing](https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/external_reporting/core.py): `jobs/etl_jobs/external/external_reporting/core.py`
- [Report services](https://github.com/pass-culture/data-gcp/tree/master/jobs/etl_jobs/external/external_reporting/services): `jobs/etl_jobs/external/external_reporting/services`
- [Metabase migration](https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/metabase/main.py): `jobs/etl_jobs/external/metabase/main.py`
- [Metabase governance](https://github.com/pass-culture/data-gcp/blob/master/jobs/etl_jobs/external/metabase-governance/main.py): `jobs/etl_jobs/external/metabase-governance/main.py`

### Other components

- **Platform operator**
- **External data sources**
- **BigQuery**
- **GCS**
- **Google Drive**
- **Metabase**
- **MLflow**
- **Vector database**

## Connections

- Platform operator → Airflow DAGs: operates
- Airflow DAGs → Airflow support: uses support (evidence: `orchestration/dags/common/callback.py`)
- Airflow DAGs → External ETL: orchestrates jobs (evidence: `README.md`)
- Airflow DAGs → Internal data jobs: orchestrates jobs (evidence: `README.md`)
- Airflow DAGs → ML training jobs: orchestrates jobs (evidence: `README.md`)
- External ETL → External data sources: extracts data
- External ETL → BigQuery: loads data
- Internal data jobs → BigQuery: moves data
- Internal data jobs → GCS: uses storage
- Report generation CLI → Report processing: runs reports (evidence: `jobs/etl_jobs/external/external_reporting/main.py`)
- Report generation CLI → Report services: uses services (evidence: `jobs/etl_jobs/external/external_reporting/main.py`)
- Report services → Google Drive: uploads reports
- Metabase migration → Metabase: migrates content (evidence: `jobs/etl_jobs/external/metabase/main.py`)
- Metabase governance → Metabase: governs content
- Metabase migration → BigQuery: logs results (evidence: `jobs/etl_jobs/external/metabase/main.py`)
- Finance forecasting → MLflow: logs runs (evidence: `jobs/ml_jobs/finance/main.py`)
- Finance forecasting → BigQuery: saves forecasts (evidence: `jobs/ml_jobs/finance/main.py`)
- ML training jobs → BigQuery: uses data
- Retrieval API → Prediction handlers: dispatches requests (evidence: `jobs/ml_jobs/retrieval_vector/app/routes.py`)
- Prediction handlers → Vector database: retrieves items
