vestergaardj's avatar
vestergaardj
Most Valuable Professional
4 months ago

Semantic Diff

After editing a Power BI semantic model, there is no built-in way to answer "what changed?" This notebook fills that gap with a structured metadata diff for semantic models in Microsoft Fabric.

The tool works in two stages. First, a snapshot engine connects to a semantic model via the Tabular Object Model (TOM) through semantic-link-labs and captures the full metadata: tables, columns, measures, relationships, partitions, roles, and shared expressions. The snapshot is persisted as a versioned JSON file in the attached Lakehouse.

Second, a diff engine compares any two snapshots and categorises every change as Added, Removed, or Modified. For modified objects, it reports exactly which properties changed with old and new values side by side. Results are displayed as colour-coded DataFrames and can be exported as a self-contained HTML report.

Typical use cases:
- Pre/post-deployment review: snapshot before and after model changes to see exactly what was modified
- Cross-environment validation: compare Dev and Prod snapshots to confirm a promotion contains only intended changes
- Audit trail: schedule periodic snapshots to build a change history for models that lack version control

Configuration requires only two variables (dataset name and optional workspace). Authentication is handled by Fabric. No hardcoded IDs or credentials.

 

Author: Jens Vestergaard · Head of Product, CatMan @ Redslim
Repository: [github.com/vestergaardj/](https://github.com/vestergaardj/Semantic-Link-TestHarness)
Built on: Semantic Link Labs by Michael Kovalsky

 

No RepliesBe the first to reply