Skip to content
All projects

Case study · 2026 to present · Anonymized

A coal mine's operations dashboard, from Excel to Microsoft Fabric

I am moving a coal mine's daily dashboard, built in Excel workbooks, to Power BI on Microsoft Fabric, with a bronze, silver and gold model whose figures match the Excel ones and pipelines generated from code.

Areas

  • Data and BI
  • Automation and AI
The Fabric workspace read with the CLI, and the generators that build the silver and gold pipelines from versioned T-SQL (internal names replaced with generic ones).

Project facts

Role
Data engineer, in charge of analyzing the current system, the Fabric model, its verification and its deployment
Period
Oct 2026 to present
Technologies
Microsoft Fabric · Fabric Data Pipelines · Fabric Notebooks · Fabric Lakehouse · Fabric Data Warehouse
Public links
Internal system: the code is private, and names, data and diagrams were left out or recreated.

At a glance

The mine's daily dashboard was assembled in macro-enabled Excel workbooks that pulled together two weighbridges and several capture forms.

  • 158

    activities in 10 pipelines, generated from code and uploaded with the Fabric CLI

    Source: Versioned pipeline definitions, October 2026

  • 24 of 24

    dashboard indicators return the expected value when recomputed with the model

    Source: Spark 3.5 verification against the Excel dashboard, October 27, 2026

  • 30 of 30

    silver tables identical between the Spark specification and Fabric's T-SQL

    Source: Parity test in Fabric, October 28, 2026

The problem

The mine's management follows daily operations (coal produced and shipped, overburden, lost hours, crushing, pumping, stockpiles and plans) on an Excel dashboard fed by two weighbridge databases, four capture workbooks and a tracking app. The company asked to move it to Power BI on its Microsoft Fabric platform without changing the figures the team already knows.

  1. Before:Each source was queried on its own and combined in Excel.

    After:Weighbridges, capture workbooks and app lists land in one bronze, silver and gold model.

  2. Before:The calculation rules were hidden in formulas and macros.

    After:Every rule is written down, confirmed by the team and tested against the dashboard figures.

  3. Before:Building the loads in Fabric meant configuring every activity by hand in the portal.

    After:Pipelines are generated from versioned code and uploaded, run and checked from the terminal.

The solution

My role

Data engineer, in charge of analyzing the current system, the Fabric model, its verification and its deployment

  1. I documented the current system (daily log, dashboard, capture forms and app) and took the calculation rules the Excel left ambiguous to the team until they were confirmed in writing.

  2. I designed the star model and built it in bronze, silver and gold layers following the methodology and naming of the company's data platform.

  3. I verified every layer with local Spark against the Excel dashboard and with parity tests against Fabric.

  4. I ran Fabric from the terminal with the Fabric CLI and the Fabric MCP server, connected to Claude Code, to create, import, run and check pipelines without going through the portal.

  5. I wrote the requirements analysis document for the users' approval.

Constraints

  • The new dashboard's figures must match the Excel ones, except for changes the team approves.

  • The capture workbooks stay in a folder on the internal network, and Fabric reads them through an on-premises gateway.

  • The methodology, naming and folders of the company's data platform were already set.

  • The weighbridge databases hold drivers' personal data, which must never reach the model.

Decisions

  1. Pipelines as code, uploaded with the Fabric CLI

    The queries of each layer live in versioned T-SQL files, and three Python generators build the 10 pipelines, with 78 copies and a failure alert per copy. The Fabric CLI imports them and the Fabric MCP server lets the assistant inspect and run the workspace. It saved me several hours compared with configuring the 158 activities by hand in the portal, and a query change is applied by regenerating, not by repeating clicks.

    Ruled out

    • Configure every copy activity in the Fabric portal
  2. Specification in Spark, production in T-SQL

    The model was written and verified first with Spark 3.5 on a local replica. It was then translated to T-SQL to follow the platform's methodology, and a parity test compares both versions table by table, column by column.

    Ruled out

    • Write straight in T-SQL and verify only in the final report
  3. Full reload on every run

    The weighbridge corrects tickets from earlier days, so an incremental load by date would miss those corrections. The five bronze pipelines reload everything in about 13 minutes.

    Ruled out

    • Incremental load by ticket date
  4. Named columns in the bronze copies

    The weighbridge copies read with a query that names every column and leaves the drivers' personal data out from the first layer.

    Ruled out

    • Copy whole tables and clean them in silver

Architecture

Weighbridges, capture workbooks and app lists land in a bronze lakehouse. Copy pipelines with T-SQL move them to a silver lakehouse and to a gold warehouse with the star model, which will feed a Direct Lake semantic model and the Power BI report. Everything is generated, imported and run from the terminal.
  1. 01Sources

    • Weighbridge databasesSQL Server at the mine and the plant
    • Capture workbooksExcel on the internal network, via a gateway
    • App listsSharePoint, with their column contract
  2. 02Fabric

    • Bronze lakehouse23 tables as they arrive
    • Silver lakehouse30 tables with business names
    • Gold warehouse17 dimensions and 11 facts
  3. 03Consumption

    • Semantic modelDirect Lake and DAX measures
    • Power BI reportThe daily dashboard
  4. 04Operations

    • Fabric CLI and MCPGenerate, import and run the pipelines

How data moves

  1. Weighbridge databasestoBronze lakehouseCopies with named columns
  2. Capture workbookstoBronze lakehouseFile copy and notebook
  3. App liststoBronze lakehouseNotebook
  4. Bronze lakehousetoSilver lakehouseCopies with T-SQL
  5. Silver lakehousetoGold warehouseDimensions and facts
  6. Gold warehousetoSemantic modelDirect Lake
  7. Semantic modeltoPower BI reportDAX measures
  8. Fabric CLI and MCPtoSilver lakehouseImports and runs the 10 pipelines

Results

  • Bronze and silver run in Fabric, with 23 bronze and 30 silver tables verified against the local replica, and gold is on its first run.

  • With the rules confirmed in writing by the team, 24 of 24 dashboard indicators return the expected value when recomputed with the model.

  • The Direct Lake semantic model, the report and hourly orchestration are still to come. The project is ongoing.

What I would do differently

  • I would have installed the Fabric CLI and MCP server from day one. I started using them once the model was verified, and they sped up exactly the most repetitive part.

  • I would ask for the platform's naming document from the start. Since there was none, it had to be inferred from another workspace.

Technologies

  • Microsoft Fabric
  • Fabric Data Pipelines
  • Fabric Notebooks
  • Fabric Lakehouse
  • Fabric Data Warehouse
  • Power BI
  • DAX
  • Apache Spark
  • SQL Server
  • Excel
  • SharePoint
  • Microsoft Graph
  • Claude Code