# ifeanyiayadiuno/etl_load architecture

> Architecture diagram of the GitHub repository ifeanyiayadiuno/etl_load, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ifeanyiayadiuno/etl_load
- Repository: https://github.com/ifeanyiayadiuno/etl_load

## Overview

This is a PyQt desktop system for reservoir-production operations. Operators maintain well identity and metadata, retrieve daily Prodview data, apply monthly allocation passes, run optional imports, then export reports or push production to Whitson+. The graph preserves those documented branches and the sampled production rebuild’s downstream synchronization steps. Several GUI, export, allocation, and integration implementations were not sampled; their documented capabilities are shown, but uncertain internal wiring is omitted.

Main entry points: [`pce_rebuild_pipeline.py`](https://github.com/ifeanyiayadiuno/etl_load/blob/main/pce_rebuild_pipeline.py) (Rebuild follow-up), [`prodview_update_gui.py`](https://github.com/ifeanyiayadiuno/etl_load/blob/main/prodview_update_gui.py) (Prodview update), [`well_master_gui.py`](https://github.com/ifeanyiayadiuno/etl_load/blob/main/well_master_gui.py) (Well Master UI), [`production_update.py`](https://github.com/ifeanyiayadiuno/etl_load/blob/main/production_update.py) (Production rebuild)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_master["Well Master"]
  node_wm_gui["Well Master UI<br/>[well_master_gui.py]"]
  node_wm_db["Well Master data<br/>[well_master_db.py]"]
end

subgraph group_production["Production ETL"]
  node_prodview_ui["Prodview update"]
  node_rebuild["Production rebuild"]
  node_post_rebuild["Rebuild follow-up"]
  node_tc_sync["Type-curve sync"]
  node_frcst["Forecast rebuild"]
end

subgraph group_accounting["Allocation"]
  node_valnav["ValNav allocation"]
  node_ngl["NGL allocation load"]
  node_sales["Public Sales ratios"]
end

subgraph group_imports["Imports"]
  node_survey_ui["Survey import UI"]
  node_survey["Survey import<br/>[survey_import.py]"]
  node_tc_ui["Type-curve import UI"]
  node_tc_import["Type-curve import"]
  node_forecast_ui["Forecast import UI"]
  node_forecast["Forecast import"]
end

subgraph group_outputs["Reporting and delivery"]
  node_exports_ui["Exports UI<br/>[exports_dialog.py]"]
  node_exports["Gathered reports"]
  node_whitson_ui["Whitson mass upload"]
  node_whitson_push["Production push"]
end

node_operator(("Operator"))
node_snowflake[("Snowflake")]
node_sql[("SQL Server")]
node_whitson["Whitson+"]
node_workbooks["Operator workbooks"]

node_operator -->|"maintains wells"| node_wm_gui
node_wm_gui -->|"loads and saves"| node_wm_db
node_wm_gui -->|"previews and imports"| node_snowflake
node_wm_db -->|"reads and writes"| node_sql
node_operator -->|"starts update"| node_prodview_ui
node_prodview_ui -->|"queries daily data"| node_snowflake
node_prodview_ui -->|"loads CDA"| node_sql
node_prodview_ui -->|"runs rebuild"| node_rebuild
node_rebuild -->|"rebuilds production"| node_sql
node_rebuild -->|"runs follow-up"| node_post_rebuild
node_post_rebuild -->|"materializes curves"| node_tc_sync
node_tc_sync -->|"syncs production"| node_sql
node_post_rebuild -->|"syncs well data and ratios"| node_sql
node_post_rebuild -->|"rebuilds forecast table"| node_frcst
node_frcst -->|"updates forecast data"| node_sql
node_operator -->|"runs monthly pass"| node_valnav
node_operator -->|"runs sales pass"| node_sales
node_valnav -->|"updates allocations"| node_sql
node_sales -->|"updates allocations"| node_sql
node_operator -->|"runs NGL update"| node_ngl
node_ngl -->|"loads allocation data"| node_sql
node_operator -->|"starts import"| node_survey_ui
node_survey_ui -->|"configures import"| node_survey
node_survey_ui -->|"selects survey file"| node_workbooks
node_survey -->|"writes surveys"| node_sql
node_operator -->|"starts import"| node_tc_ui
node_tc_ui -->|"configures import"| node_tc_import
node_tc_ui -->|"selects curve file"| node_workbooks
node_tc_import -->|"writes type curves"| node_sql
node_tc_import -->|"runs follow-up"| node_post_rebuild
node_operator -->|"starts import"| node_forecast_ui
node_forecast_ui -->|"configures import"| node_forecast
node_forecast_ui -->|"selects forecast file"| node_workbooks
node_forecast -->|"loads forecasts"| node_sql
node_operator -->|"requests reports"| node_exports_ui
node_exports_ui -->|"gathers monthly data"| node_exports
node_exports -->|"reads production"| node_sql
node_operator -->|"starts upload"| node_whitson_ui
node_whitson_ui -->|"prepares upload"| node_whitson_push
node_whitson_push -->|"reads production"| node_sql
node_whitson_push -->|"pushes production"| node_whitson

click node_wm_gui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/well_master_gui.py"
click node_wm_db "https://github.com/ifeanyiayadiuno/etl_load/blob/main/well_master_db.py"
click node_prodview_ui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/prodview_update_gui.py"
click node_rebuild "https://github.com/ifeanyiayadiuno/etl_load/blob/main/production_update.py"
click node_post_rebuild "https://github.com/ifeanyiayadiuno/etl_load/blob/main/pce_rebuild_pipeline.py"
click node_tc_sync "https://github.com/ifeanyiayadiuno/etl_load/blob/main/sync_typecurves_to_production.py"
click node_frcst "https://github.com/ifeanyiayadiuno/etl_load/blob/main/pce_frcst_prd_rebuild.py"
click node_valnav "https://github.com/ifeanyiayadiuno/etl_load/blob/main/ngl_monthly_update.py"
click node_ngl "https://github.com/ifeanyiayadiuno/etl_load/blob/main/ngl_allocation_load.py"
click node_sales "https://github.com/ifeanyiayadiuno/etl_load/blob/main/sales_allocation_updates.py"
click node_survey_ui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/survey_import_dialog.py"
click node_survey "https://github.com/ifeanyiayadiuno/etl_load/blob/main/survey_import.py"
click node_tc_ui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/type_curves_import_dialog.py"
click node_tc_import "https://github.com/ifeanyiayadiuno/etl_load/blob/main/type_curves_import.py"
click node_forecast_ui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/monthly_forecasts_import_dialog.py"
click node_forecast "https://github.com/ifeanyiayadiuno/etl_load/blob/main/monthly_forecasts_import.py"
click node_exports_ui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/exports_dialog.py"
click node_exports "https://github.com/ifeanyiayadiuno/etl_load/blob/main/exports_gathered_monthly.py"
click node_whitson_ui "https://github.com/ifeanyiayadiuno/etl_load/blob/main/whitson_mass_upload_dialog.py"
click node_whitson_push "https://github.com/ifeanyiayadiuno/etl_load/blob/main/whitson_production_push.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_wm_gui,node_wm_db toneBlue
class node_prodview_ui,node_rebuild,node_post_rebuild,node_tc_sync,node_frcst,node_snowflake,node_sql toneAmber
class node_valnav,node_ngl,node_sales toneMint
class node_survey_ui,node_survey,node_tc_ui,node_tc_import,node_forecast_ui,node_forecast toneRose
class node_exports_ui,node_exports,node_whitson_ui,node_whitson_push,node_operator,node_whitson,node_workbooks toneIndigo
```

## Components

### Well Master

- [Well Master UI](https://github.com/ifeanyiayadiuno/etl_load/blob/main/well_master_gui.py): `well_master_gui.py`
- [Well Master data](https://github.com/ifeanyiayadiuno/etl_load/blob/main/well_master_db.py): `well_master_db.py`

### Production ETL

- [Prodview update](https://github.com/ifeanyiayadiuno/etl_load/blob/main/prodview_update_gui.py): `prodview_update_gui.py`
- [Production rebuild](https://github.com/ifeanyiayadiuno/etl_load/blob/main/production_update.py): `production_update.py`
- [Rebuild follow-up](https://github.com/ifeanyiayadiuno/etl_load/blob/main/pce_rebuild_pipeline.py): `pce_rebuild_pipeline.py`
- [Type-curve sync](https://github.com/ifeanyiayadiuno/etl_load/blob/main/sync_typecurves_to_production.py): `sync_typecurves_to_production.py`
- [Forecast rebuild](https://github.com/ifeanyiayadiuno/etl_load/blob/main/pce_frcst_prd_rebuild.py): `pce_frcst_prd_rebuild.py`

### Allocation

- [ValNav allocation](https://github.com/ifeanyiayadiuno/etl_load/blob/main/ngl_monthly_update.py): `ngl_monthly_update.py`
- [NGL allocation load](https://github.com/ifeanyiayadiuno/etl_load/blob/main/ngl_allocation_load.py): `ngl_allocation_load.py`
- [Public Sales ratios](https://github.com/ifeanyiayadiuno/etl_load/blob/main/sales_allocation_updates.py): `sales_allocation_updates.py`

### Imports

- [Survey import UI](https://github.com/ifeanyiayadiuno/etl_load/blob/main/survey_import_dialog.py): `survey_import_dialog.py`
- [Survey import](https://github.com/ifeanyiayadiuno/etl_load/blob/main/survey_import.py): `survey_import.py`
- [Type-curve import UI](https://github.com/ifeanyiayadiuno/etl_load/blob/main/type_curves_import_dialog.py): `type_curves_import_dialog.py`
- [Type-curve import](https://github.com/ifeanyiayadiuno/etl_load/blob/main/type_curves_import.py): `type_curves_import.py`
- [Forecast import UI](https://github.com/ifeanyiayadiuno/etl_load/blob/main/monthly_forecasts_import_dialog.py): `monthly_forecasts_import_dialog.py`
- [Forecast import](https://github.com/ifeanyiayadiuno/etl_load/blob/main/monthly_forecasts_import.py): `monthly_forecasts_import.py`

### Reporting and delivery

- [Exports UI](https://github.com/ifeanyiayadiuno/etl_load/blob/main/exports_dialog.py): `exports_dialog.py`
- [Gathered reports](https://github.com/ifeanyiayadiuno/etl_load/blob/main/exports_gathered_monthly.py): `exports_gathered_monthly.py`
- [Whitson mass upload](https://github.com/ifeanyiayadiuno/etl_load/blob/main/whitson_mass_upload_dialog.py): `whitson_mass_upload_dialog.py`
- [Production push](https://github.com/ifeanyiayadiuno/etl_load/blob/main/whitson_production_push.py): `whitson_production_push.py`

### Other components

- **Operator**
- **Snowflake**
- **SQL Server**
- **Whitson+**
- **Operator workbooks**

## Connections

- Operator → Well Master UI: maintains wells
- Well Master UI → Well Master data: loads and saves
- Well Master UI → Snowflake: previews and imports
- Well Master data → SQL Server: reads and writes
- Operator → Prodview update: starts update
- Prodview update → Snowflake: queries daily data
- Prodview update → SQL Server: loads CDA
- Prodview update → Production rebuild: runs rebuild
- Production rebuild → SQL Server: rebuilds production
- Production rebuild → Rebuild follow-up: runs follow-up
- Rebuild follow-up → Type-curve sync: materializes curves
- Type-curve sync → SQL Server: syncs production
- Rebuild follow-up → SQL Server: syncs well data and ratios
- Rebuild follow-up → Forecast rebuild: rebuilds forecast table
- Forecast rebuild → SQL Server: updates forecast data
- Operator → ValNav allocation: runs monthly pass
- Operator → Public Sales ratios: runs sales pass
- ValNav allocation → SQL Server: updates allocations
- Public Sales ratios → SQL Server: updates allocations
- Operator → NGL allocation load: runs NGL update
- NGL allocation load → SQL Server: loads allocation data
- Operator → Survey import UI: starts import
- Survey import UI → Survey import: configures import
- Survey import UI → Operator workbooks: selects survey file
- Survey import → SQL Server: writes surveys
- Operator → Type-curve import UI: starts import
- Type-curve import UI → Type-curve import: configures import
- Type-curve import UI → Operator workbooks: selects curve file
- Type-curve import → SQL Server: writes type curves
- Type-curve import → Rebuild follow-up: runs follow-up
- Operator → Forecast import UI: starts import
- Forecast import UI → Forecast import: configures import
- Forecast import UI → Operator workbooks: selects forecast file
- Forecast import → SQL Server: loads forecasts
- Operator → Exports UI: requests reports
- Exports UI → Gathered reports: gathers monthly data
- Gathered reports → SQL Server: reads production
- Operator → Whitson mass upload: starts upload
- Whitson mass upload → Production push: prepares upload
- Production push → SQL Server: reads production
- Production push → Whitson+: pushes production
