Ir al contenido

Diagrama de Flujo y Ecosistema de IngelCoding


tags:

  • arquitectura
  • flow
  • ecosistema
  • ingelcoding created: 2026-04-11 type: concepto status: activo

Vista general del flujo de datos de IngelCoding

┌─────────────────────────────────────────────────────────────────────────┐
│ INGELSUR CODING │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ ENTRADA DE DATOS │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ Emails IMAP │ │ Archivos │ │ APIs │ │ │
│ │ │ (HES/SAP) │ │ Excel/PDF │ │ (Nube) │ │ │
│ │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │ │
│ └─────────┼──────────────────┼──────────────────┼───────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ CAPTURA DE DATOS (incremental) │ │
│ │ ┌──────────────────┐ ┌──────────────────┐ │ │
│ │ │ imap_client │ │ raw_loaders │ │ │
│ │ │ │ │ │ │ │
│ │ │ - Conexión │ │ - Excel reader │ │ │
│ │ │ - Fetch emails │ │ - PDF parser │ │ │
│ │ │ - Descarga │ │ - JSON loader │ │ │
│ │ │ - incremental.py│ │ │ │ │
│ │ └────────┬─────────┘ └────────┬─────────┘ │ │
│ └───────────┼──────────────────────────────┼────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ RAW STORE (canónico acumulativo) │ │
│ │ │ │
│ │ /data_raw/ /ENTRADAS/ /JSON/ │ │
│ │ ├── emails_pedidos_HES_raw/ ├── gantt/ ├── pedidos/ │ │
│ │ ├── emails_facturacion_raw/ ├── facturas/ ├── facturas/│ │
│ │ └── {dataset}_{ABV}.parquet └── ... └── ... │ │
│ │ (merge + dedup por message_id) │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PROCESAMIENTO │ │
│ │ │ │
│ │ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────┐ │ │
│ │ │ process_pedidos │ │ process_factura │ │ process_gantt│ │ │
│ │ │ _HES_from_raw │ │ _from_raw │ │ │ │ │
│ │ └────────┬─────────┘ └────────┬─────────┘ └──────┬───────┘ │ │
│ │ │ │ │ │ │
│ │ ▼ ▼ ▼ │ │
│ │ ┌────────────────────────────────────────────────────────┐ │ │
│ │ │ PARSERS │ │ │
│ │ │ email_parser │ classifiers │ normalize_brigadas │ │ │
│ │ └────────────────────────────────────────────────────────┘ │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ LÓGICA DE NEGOCIO │ │
│ │ │ │
│ │ business_facturacion.py │ business_pedidos_HES.py │ │
│ │ business_valorizaciones.py │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PROCESSED STORE (parquet + manifest) │ │
│ │ │ │
│ │ /SALIDAS/processed/ │ │
│ │ ├── pedidos_HES/ {name}.parquet + _manifest.json │ │
│ │ ├── facturacion/ {name}.parquet + _manifest.json │ │
│ │ └── ... │ │
│ │ │ │
│ │ processed_store.py — load_processed_or_pkl() (DRY fallback) │ │
│ │ │ │
│ └──────────────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ┌────────────────────┼────────────────────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ SALIDA │ │
│ │ │ │
│ │ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────┐ │ │
│ │ │ excel_writer │ │ excel_writer │ │ gantt │ │ │
│ │ │ _facturacion │ │ _pedidos_HES │ │ _normalizado │ │ │
│ │ └────────┬─────────┘ └────────┬─────────┘ └──────┬───────┘ │ │
│ │ │ │ │ │ │
│ │ ▼ ▼ ▼ │ │
│ │ ┌────────────────────────────────────────────────────────┐ │ │
│ │ │ /SALIDAS/ + /SALIDAS/db/ │ │ │
│ │ │ ├── reportes_facturacion.xlsx │ │ │
│ │ │ ├── reportes_pedidos_HES.xlsx │ │ │
│ │ │ ├── gantt_normalizado_powerbi.csv │ │ │
│ │ │ ├── db/ingeldata.db (SQLite operacional) │ │ │
│ │ │ └── db/data_warehouse.db (DW analítico) │ │ │
│ │ └────────────────────────────────────────────────────────┘ │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ pipeline_runs (TRAZABILIDAD TRANSVERSAL) │ │
│ │ │ │
│ │ sqlite_store.py → ingeldata.db → tabla pipeline_runs │ │
│ │ Campos: input_hash · output_rows · raw_date_from/to │ │
│ │ code_version · usuario · timestamp │ │
│ │ ↕ (registra cada capa) │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
CapaRutaDescripción
Raw Storedata_raw/Parquets acumulativos por dominio+usuario ({dataset}_{ABV}.parquet). Merge + dedup por message_id. Un solo archivo canónico por dominio, sin archivos manuales por mes.
Processed StoreSALIDAS/processed/Parquets curados con _manifest.json por dominio. Reemplaza el pkl volátil. Lectura mediante load_processed_or_pkl() con fallback legacy.
Output StoreSALIDAS/db/SQLite operacional (ingeldata.db con tabla pipeline_runs) + DW analítico (data_warehouse.db).

Ver detalle de archivos en Estructura-Directorios-Repositorio.


SistemaDescripción
IMAP/GmailAcceso a emails
HESSistema interno de pedidos
SAPSistema de gestión empresarial
NubeDatos en la nube (explosión)