Case study · 2026 to present · Anonymized
Telemetry for a solar fleet, from two vendor clouds to Fabric and PostgreSQL
I built and run the flow that gathers the output of hundreds of rooftop solar systems from two vendor platforms, joins it with the homes master list and publishes it in bronze, silver and gold layers on Microsoft Fabric and PostgreSQL.
Areas
- Automation and AI
- Data and BI
- Backend
- Infrastructure
Project facts
- Role
- Data engineer in charge of the design, build and operation of the system
- Period
- Jul 2026 to present
- Technologies
- Python · Polars · Delta Lake · MQTT · SQLite
- Public links
- Internal system: the code is private, and names, data and diagrams were left out or recreated.
At a glance
A solar program on social housing had the output of each rooftop split across two vendor clouds, with no way to see it together.
381
automated tests across the main ETL, the real-time channel and the watchdog
Source: pytest suites of the three components, October 2026
1,498
plant-hours compared with the vendors' apps, with no difference in energy
Source: Validation against the source apps, August 2026
3 h to 12 ms
for the analysts' metrics query, once moved to materialized views
Source: Fix for the PostgreSQL lock incident, October 2026
The problem
An energy group installed solar systems on social housing rooftops, aiming at thousands of homes. Output sat in two micro-inverter vendor platforms, one with no public API and one with a paid API whose cost grows with the energy produced. The business needed each home as a plant, joined with its customer master list, in Power BI and in SQL for its analysts.
Before:Each vendor showed its devices in its own app.
After:Both sources reach one model, one home per plant, every three hours.
Before:One platform charged per call and its free trial ran out.
After:Its devices are read through a free push channel, with coverage checked hour by hour.
Before:If a job failed at night, nobody knew until the next day.
After:A watchdog checks every ten minutes and emails on failure and on recovery.
My role
Data engineer in charge of the design, build and operation of the system
Designed the dimensional model (five dimensions and four fact tables) and the medallion architecture across two destinations.
Built the collectors for both platforms and the real-time channel that replaced the paid API.
Audited a colleague's prototype for that channel, corrected how it read the data and took it to production.
Deployed and run the system on a Linux server with systemd services, alerts and a watchdog that emails.
Constraints
Neither platform offers an API meant for this use, and the paid one used up its trial quota.
The Fabric capacity is corporate and shared, and it was down for weeks for reasons outside the project.
Analysts query PostgreSQL while the ETL writes, on a database behind a private endpoint.
No real data about homes, contracts or devices may leave the client's environment.
Decisions
A home is a plant, identified by its contract
A mass rename in the vendor apps erased the installer's naming convention. Anchoring identity to the grid operator contract keeps surrogate keys stable even when names change.
Ruled out
- Keep using each plant's name in the app
A free push channel instead of the paid API
The paid plan cost in the tens of thousands of dollars a year and grew with output. The push channel costs nothing; the contractual risk was documented and accepted by the business.
Ruled out
- Pay for the platform's enterprise plan
- A collector on each home's local network
An hour with no reports closes only if the channel was listening
With pushed data, receiving nothing can mean the listener was down. An hour closes only when heartbeats cover it, and session edges are marked as estimated, with no false zeros.
Ruled out
- Treat missing reports as zero output
One watermark per destination
Fabric and PostgreSQL each advance with their own mark. When the shared Fabric capacity was down for weeks, PostgreSQL stayed current and Fabric caught up without losing data.
Ruled out
- A single mark for both destinations
Architecture
01Sources
- Vendor platform AUndocumented API, whole-day series
- Vendor platform BMQTT push channel
- Homes master listThe business's Excel workbook
02Capture
- Batch collectorHourly, heals itself
- 24/7 listenerSQLite in WAL mode, with heartbeats
03Medallion
- BronzeDelta lakehouse and PostgreSQL
- SilverCleaning, union and data quality
- GoldFabric warehouse and PostgreSQL
04Consumption
- Power BIDirect Lake model on gold
- Analysts in SQLMaterialized views
05Operations
- Alerts engineEvery ten minutes, one episode per row
- Watchdogsystemd and email through Microsoft Graph
How data moves
- Vendor platform AtoBatch collectorFive-minute series
- Vendor platform Bto24/7 listenerReports every 30 seconds
- Batch collectortoBronzeEvery three hours
- 24/7 listenertoBronzeHours covered by heartbeats
- Homes master listtoSilverOne home, one plant
- BronzetoSilverSources unified
- SilvertoGoldMERGE into the star schema
- GoldtoPower BIDirect Lake
- GoldtoAnalysts in SQLViews and foreign tables
- 24/7 listenertoAlerts engineSilent devices and faults
- WatchdogtoBatch collectorChecks every service and timer
Results
Output from both platforms reaches one model every three hours, on Fabric and on PostgreSQL, with 1,498 plant-hours equal to the source apps.
The real-time channel replaced the paid API at zero cost, and its gold layer matches the main ETL's cell by cell.
A lock incident that left the analysts without service was fixed with materialized views, and their metrics query went from 3 hours to 12 ms.
A weeks-long outage of the shared Fabric capacity cost no data, because each destination keeps its own progress.
What I would do differently
I would measure each source's cost per unit of energy produced from day one, not per device, since that is what made the paid API unworkable as the fleet grew.
I would separate the ETL's writes from the analysts' queries sooner, since one TRUNCATE queued behind a long query blocked everyone.
Technologies
- Delta Lake
- Microsoft Fabric
- Fabric Lakehouse
- Fabric Data Warehouse
- Power BI
- Microsoft Graph
- systemd