haiders's avatar
haiders
Regular Visitor
6 months ago

SMDoc: Semantic Model Documentation Workload

Workload Idea is to turn Power BI semantic model into a complete, editable documentation package (diagram + PDF + artifacts) inside Fabric, only in 7–10 clicks, in PDF format. Just click-click-click and have a semantic model documentation in PDF format.

 

 

 

Problem Solved

  • Pain point: Documentation for semantic models is time-consuming, fragmented, and often out-of-date. I am sure people have created notebooks using INFO functions, but I was not able to find a document solution for diagram layout. Analytic Endeavors has a solution in their future release but that's for the desktop. I embeded draw.io into my workload for a diagram editor. It is a free tool and works great with the code, unlike visio.
  • Solution: Automates metadata extraction, produces a high-fidelity draw.io diagram, generates a PDF summary, and stores artifacts in OneLake — all from within Fabric so teams can document, review, and share models quickly and reproducibly.

How It Works

  • Create: Add a new SMDoc item in Fabric and open the Setup tab.
  • Configure: Choose workspace, lakehouse, and semantic model, all from drop-downs. No manual inputs IDs or names.
  • Generate: Click “Generate Doc File” — SMDoc programmatically creates and runs a Fabric Notebook to extract metadata and build artifacts, mainly through semantic link labs so no token generation require at each run like in Fabric Rest API.
  • Edit: Open the embedded draw.io editor to inspect or modify the ER diagram. Main feature of my workload.
  • Export/Combine: Export SVG/PDF and optionally merge diagram + summary into a single deliverable.

Key Features

  • Embedded Draw.io: Interactive, colorful ER diagrams editable directly inside Fabric.
  • Notebook Orchestration: Automated notebook creation and execution via Fabric Platform APIs.
  • High-Resolution Output: 4K vector-quality PDFs and SVG exports for print-quality documentation.
  • Lakehouse Artifacts: Saves CSV artifacts and Delta tables to OneLake for auditing and reuse.
  • Quick Workflow: End-to-end documentation in ~7–10 user actions, lowering time-to-insight.

Limitations: Goal is to submit a working solution before the contest ends. Which is there and my workload is doing the job. Just some small tweaks required.

  • PDF index layout: Index page sizing needs refinement.
  • Post-merge metadata: Semantic vertipaq size and number of items not included after PDF combining in last step.
  • UI tweaks: Lakehouse explorer is not yet resizable; initial item selection UX can be improved.
  • Minor data gaps: Measures missing names in Delta exports (documented in repo).
  • Logo: I missed the logo while making video. Added it now.

     

     

Why It Matters

  • Time savings: It takes 3 minutes to install libraries in notebook. Except that it takes less than a minute to get semantic modle PDF. Zero time and effort required from the user.
  • Governance-ready: Produces auditable artifacts (CSV + Delta) for compliance and reviews.
  • Extensible pattern: The notebook + embedded-editor approach is reusable for lineage, model comparison, or automated audits.

Demo & Repo

 

I have used FUAM semantic model as an example. Was not able to find a complex free sample semantic model online.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No RepliesBe the first to reply