
In Short: The Model Becomes Readable From Code
Semantic link is one of Fabric's most underrated features: through the sempy Python library, notebooks can connect to Power BI semantic models the way they connect to any data source. Not just the tables underneath the model, but the model itself: evaluating its measures, traversing its relationships, reading its metadata, executing DAX from code.
That closes a gap that has existed since BI and data science became separate professions. The data scientist re-implementing revenue in pandas, slightly differently from the certified measure, is a small tragedy repeated in every organisation. Semantic link's answer: stop re-deriving, evaluate the governed measure directly.
What It Actually Enables
Data science on governed metrics. A churn model that uses the organisation's actual customer lifetime value measure, evaluated from the certified model, produces predictions the business can reconcile with its own reports. When the notebook and the dashboard agree by construction, adoption conversations get much shorter. The predictions flow back to OneLake through the standard Fabric ML workflow.
Model validation as code. Because metadata is programmatic, the checks BI teams do by eye become assertions in a scheduled notebook: every fact table reaches every dimension it should, no measure references deprecated columns, naming standards hold, sensitive columns carry the labels they must. Run on a schedule, that is a regression test suite for the semantic model estate.
Data quality assertions where the business looks. Quality checks against raw tables miss errors introduced by the model itself: a broken relationship, a filter direction flipped in a deployment. Asserting on evaluated measures - yesterday's revenue is within expected bounds, row counts by region are complete - tests the number the CFO actually sees.
Estate automation and documentation. Measure inventories, dependency maps, cross-workspace consistency reports: everything that used to be a quarterly manual audit becomes a notebook someone runs, or a pipeline nobody has to.
The Patterns Worth Copying
- A scheduled validation notebook per critical model, asserting structure and key measure values, alerting on failure
- Feature engineering that pulls governed measures through semantic link instead of re-deriving business logic
- A documentation notebook that walks the estate and publishes measure definitions where analysts can find them
- Pre-deployment checks in CI: run assertions against the updated model before it reaches production, alongside your deployment pipeline discipline
Teams that adopt these patterns report the same shift: model quality stops being a matter of individual craftsmanship and starts being enforced, the way software teams enforce tests. Given that Copilot and agents now read the model as their source of truth, programmatic guarantees about model correctness have become AI answer-quality guarantees too.
Practicalities
Semantic link ships in Fabric notebooks - sempy is available in the runtime, with read patterns into pandas and Spark. Costs are ordinary notebook capacity consumption, and heavy measure evaluation over large models is a real query load, so schedule estate-wide validation sensibly rather than hourly. Access is governed: the executing identity needs model permissions, and tenant XMLA settings apply.
The strategic framing: OneLake unified where data lives; semantic link unifies where meaning lives. Any organisation serious about one version of the truth now has the tooling to test that claim nightly, from a notebook.
Sources and Further Reading
Frequently asked
A capability, delivered through the sempy Python library, that lets Fabric notebooks connect to Power BI semantic models as first-class data sources: reading tables, evaluating measures, inspecting relationships and metadata, and running DAX from code.
Because the semantic model carries the business logic: the measures, the relationships, the definitions the organisation has agreed on. Reading raw tables means re-deriving revenue or margin in pandas and hoping it matches the reports. Evaluating the model's own measures guarantees the notebook and the dashboard agree.
It exposes model metadata programmatically, which enables estate automation: validating that relationships and measures follow standards, checking for broken dependencies, generating documentation, and running data quality assertions against governed metrics on a schedule.
Access follows Fabric's permission model: the notebook operates under an identity that needs access to the semantic model, and XMLA-based access follows the tenant's settings. It is governed access from code, not a side door around workspace security.
No. BI engineers may get the most value: automated model testing, documentation generation and cross-model consistency checks turn semantic models from hand-audited artefacts into programmatically verified ones, which is a quiet revolution in estate quality.


