The Problem
The company managed operational KPIs through Excel files shared via email, with data manually extracted from 3 different systems. The process required 2 days/week and data was often outdated or inconsistent.
- Manual reports required 2 days of work per week
- Outdated data by distribution time (48h delay)
- Transcription errors and corrupted Excel formulas
Constraints
- • Integration with legacy ERP without documented APIs
- • On-premise server with network limitations
- • No direct access to production database
- • Sensitive business data, no public cloud
The Solution
Architecture
Self-hosted dashboard with daily ETL from 3 data sources. Python for ingestion, PostgreSQL for storage, Metabase for visualization. Deployed on client's on-premise VM.
Key Decisions
- Metabase instead of custom solutions to reduce maintenance
- Nightly scheduled ETL to minimize impact on production systems
- CSV export from legacy ERP instead of screen scraping (more stable)
- PostgreSQL on Docker to simplify backups and migrations
Approach
Iterative: first ETL for most critical data source, then progressive addition of others. Dashboard co-designed with stakeholders through weekly reviews.
def load_daily(sources, day):
# Idempotent nightly ETL: re-running a day
# replaces rows, never duplicates them.
with pg.transaction():
for source in sources:
df = source.extract(day) # CSV export from legacy ERP
pg.execute(
"DELETE FROM kpi WHERE day = %s AND source = %s",
day, source.name,
)
pg.copy(df, table="kpi", partition=day)Measurable Results
Fully automated process
Nightly ETL with previous day data
Estimated from reports before/after
Proxy metricOverall Impact
The ops team recovered 2 days/week of manual work, now dedicated to analysis instead of data entry. Managers have real-time access to KPIs and can make faster decisions.
My Role
- Analysis of existing systems and data source mapping
- Architecture design and tech stack selection
- ETL pipeline implementation
- PostgreSQL and Metabase setup
- Dashboard co-design with stakeholders
- Documentation and handover to IT team
