Repository navigation
feat(ingest/powerbi): resolve Fabric SQL endpoints to OneLake lineage - #20884
brock-acryl wants to merge 12 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
cbb772f to
dcfef2b
Compare
dcfef2b to
cc867fb
Compare
cc867fb to
706a337
Compare
706a337 to
96cd3fc
Compare
96cd3fc to
aef257a
Compare
aef257a to
325799f
Compare
b42323f to
e82814e
Compare
e82814e to
3191f8f
Compare
3191f8f to
f450158
Compare
f450158 to
fba44bb
Compare
…ke lineage
In workspace_apis mode a semantic-model table that reads a Fabric SQL
analytics endpoint through `Sql.Database("<host>.datawarehouse.fabric.
microsoft.com", ...)` got a generic mssql upstream, and only lakehouse
endpoints were counted or reported. Now:
- Warehouse items are counted as their own SQL endpoint
(`fabric_warehouse_endpoints_registered`); a warehouse id is its endpoint
id, so the existing Warehouse artifact already resolves DirectLake
partitions over it. Lakehouse endpoints get a matching counter.
- MSSqlLineage attaches a FabricSqlEndpointReference when the server is a
Fabric endpoint host; the mapper swaps the mssql edge (and its column
lineage) for the OneLake table behind the endpoint, matched by endpoint
id or item display name against the workspace's Fabric items, with
platform_instance/env from server_to_platform_instance keyed by
workspace id. An endpoint that is not one of the workspace's items keeps
the mssql edge and is reported as `Fabric Endpoint Not Resolved`
(`fabric_endpoints_unresolved`); the lakehouse properties failure shares
that title and counter.
- Datamarts, mirrored databases and SQL databases are deliberately left
out: the OneLake connector does not ingest their tables, so an edge to
them would be phantom lineage (a datamart also exposes no endpoint id to
a service principal).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- A swapped OneLake upstream bypasses the dataset_type_mapping filter (like DirectLake lineage), so a narrowed mapping that let the mssql edge through no longer turns it into no edge at all. - A display name shared by several Lakehouses/Warehouses is reported as `Fabric Endpoint Name Ambiguous` and keeps the mssql edge instead of guessing; ids are collected across all name matches. - Native `[Query=...]` over an endpoint host now gets references from the parsed table names and is swapped too; `Sql.Databases` navigations and navigations without an Item are reported as `Fabric Endpoint M Shape Unsupported` instead of silently keeping an mssql edge. An endpoint behind an unresolved dataset parameter still falls through (documented). - Counters split: `fabric_lakehouse_endpoints_unresolved` (API side) vs `fabric_endpoint_references_unresolved` / `_ambiguous` (mapper side), plus `fabric_endpoint_m_shapes_unsupported`. - Shared `_onelake_platform_detail`, extracted warning helper, dropped the dead env fallback (resolvers always return an env). - Docs: breaking-change note (both metadata modes, edges rewritten in place, nothing deleted) and the URN casing rule against the OneLake connector. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… too A Dataflow Gen2 entity whose query reads a Fabric SQL analytics endpoint kept a generic mssql edge while the same query on a semantic-model table was mapped to the OneLake table. extract_dataflow_entity_lineage now takes the workspace and resolves endpoint references before mapping the upstreams. Docs note that these OneLake edges bypass dataset_type_mapping (as DirectLake does) and the breaking-change entry carries a PR placeholder. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ineage Give the warehouse-model fixture a refresh schedule answer, recount the report counters with every feature of the stack on, regenerate the workspace_apis goldens, and pin that a Fabric endpoint swap keeps the sourceColumn column lineage of a field the model renamed on the OneLake URN. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…set_type_mapping Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryOverview Registration and resolution list Fabric items, fetch lakehouse SQL endpoint properties (and warehouse connection strings when needed), track endpoint hosts for display-name matching, and warn on unresolved, ambiguous, or unsupported M shapes ( Docs add a breaking-change note and a Power BI source section on Fabric Lakehouse/Warehouse lineage; new reporter counters and broad unit/integration coverage exercise warehouse import and DirectLake cases. Reviewed by Cursor Bugbot for commit e39e702. Bugbot is set up for automated code reviews on this repo. Configure here. |
…nameColumns Rebuilding Lineage field by field after renames dropped fabric_endpoint_references, so a Sql.Database navigation followed by Table.RenameColumns kept its mssql upstream instead of the OneLake table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 15 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
- A display-name match only counts on the workspace's own endpoint host when that host is known (read from lakehouse properties), so a query on another workspace's endpoint is not linked to a same-named local item. - A lakehouse whose properties name no SQL endpoint is counted and warned instead of dropped silently. - A Fabric endpoint navigation that resolves no table is reported as an unsupported shape. - Native-query tables with a dot in their bracketed name are split by anchoring on the connected database instead of the last three segments. - Ambiguous and unresolved endpoint warnings fire once per table, like their counters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cc39c37. Configure here.
…ql names Anchoring the split on the connected database misread a platform instance of the same name as the database. The instance the URN was built with is now stripped first; database and schema are the next two segments and the rest is the table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…paces Display-name matches for Sql.Database queries are only scoped to the workspace's endpoint host when that host is known. Warehouse-only workspaces now record it from one warehouse properties call, and the docs state that admin_scan reports no host. Adds a test that id matches are unaffected by the host check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…oint fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Summary
Sql.Database("<endpoint>.datawarehouse.fabric.microsoft.com", …), including native[Query=…]SQL, now gets its upstream on the OneLake table the OneLake connector emits, instead of a genericmssqldataset no connector produces. Applies in both metadata modes.mssqledge and are warned. Unsupported shapes (Sql.Databases, navigation withoutItem) are warned.dataset_type_mapping, same as DirectLake lineage.Breaking change
The
mssqlupstream edges of Fabric SQL-endpoint queries move to OneLake. URN casing matches when OneLake runs withconvert_urns_to_lowercase: trueor Power BI withconvert_lineage_urns_to_lowercase: false. Seedocs/how/breaking-changes.md.Stack
Part of a stack built on #20842 (Power BI
metadata_api_mode: workspace_apis). Merge order:#20876 → #20877 → #20878 → #20879 → #20880 → #20881 → #20882 → #20883 → #20884 → #20885.
Review this PR's own diff against its base branch; each layer is self-contained and tested on its own.
Checklist
metadata-ingestion/docs/sources/powerbi/)docs/how/breaking-changes.md🤖 Generated with Claude Code