feat(ingest/powerbi): enrich the admin scan with item definitions
BR
10d ago+4214+4214+0123456789012345678901234567890123456789-129-129-012345678901234567890123456789
Summary
New enrich_from_item_definitions (default false, admin_scan only; rejected with workspace_apis, admin_apis_only and GOVERNMENT):
- After the admin scan builds datasets, fetches each semantic model's TMDL (and report PBIR) and overlays it onto the scan-built objects:
sourceColumn, DAX references, calculated flags, field properties, relationships, RLS and partitions. Descriptions are filled only where the scan had none. - The scan stays the source of truth for which tables and fields exist: definition-only or scan-only tables and fields are warned and counted, never added or removed.
- All definition problems are warnings in this mode, since the scan already provided the entities. A Fabric token failure surfaces in
test_connectionas a failed capability. - Unlocks
extract_model_relationships,extract_report_field_usage,extract_dax_reference_lineage,extract_model_properties,extract_report_visualsandextract_composite_model_lineagein admin-scan mode. _fill_dataset_from_definitionis recomposed from the same shared steps, so both modes run one implementation.
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
- PR title follows the Conventional Commits format
- Tests added/updated (unit and integration goldens)
- Docs updated (
metadata-ingestion/docs/sources/powerbi/) - No breaking change (opt-in flag, default off)
🤖 Generated with Claude Code