Skip to main content
ClaudeWave
Skill693 repo starsupdated today

lineage-analysis

The lineage-analysis skill traces which Power BI reports across Fabric workspaces depend on a specific semantic model, enabling impact assessment before modifications. Use it when auditing report-to-model connections, identifying affected reports before deleting a dataset, or mapping cross-workspace dependencies, though it discovers only Power BI reports and not other consumers like Excel connections or composite models.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/data-goblin/power-bi-agentic-development /tmp/lineage-analysis && cp -r /tmp/lineage-analysis/plugins/semantic-models/skills/lineage-analysis ~/.claude/skills/lineage-analysis
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Lineage Analysis

Trace downstream dependencies from a semantic model to all connected reports across the tenant. No admin permissions required -- workspace contributor access is sufficient.

## When to Use

- Before modifying or deleting a semantic model, to understand impact
- Auditing which reports are connected to a model and where they live
- Identifying orphaned or test reports connected to production models
- Cross-workspace dependency mapping

## Downstream Reports

Run `scripts/get-downstream-reports.py` to find all reports bound to a semantic model.

```bash
# By workspace and model name
python3 scripts/get-downstream-reports.py "Workspace Name" "Model Name"

# By dataset GUID directly
python3 scripts/get-downstream-reports.py --dataset-id <guid>

# JSON output for further processing
python3 scripts/get-downstream-reports.py "Workspace" "Model" --json
```

**Requirements:** `azure-identity`, `requests` (`pip install azure-identity requests`). Authenticated via `DefaultAzureCredential` (works with `az login`, managed identity, or environment variables).

**How it works:** Lists all workspaces the user can access, then queries each workspace's reports in parallel (8 workers) checking `datasetId`. Groups results by workspace. Typically completes in under 10 seconds for ~100 workspaces.

**Permissions:** Workspace contributor or higher on any workspace to be scanned. Reports in workspaces without access will not appear. For full tenant coverage, use the `--dataset-id` flag with a tenant admin token and the `admin/reports` API instead.

## Limitations

**Reports are not the only consumers.** A semantic model can also be consumed by:
- Analyze in Excel workbooks (.xlsx live connections)
- Composite models (other semantic models chaining via DirectQuery)
- Explorations (ad-hoc visual explorations in the Power BI service)
- Fabric notebooks (connecting via Spark or sempy)
- Fabric data agents
- Paginated reports (.rdl)
- Dataflows referencing the model
- Third-party tools connecting via XMLA

The script only discovers Power BI reports. For full dependency mapping including these other item types, use the Fabric lineage APIs (`fab api "admin/groups/{id}/lineage"`) or the lineage view in the Power BI service UI.

**Not appropriate for many models at once.** The script scans all accessible workspaces per invocation. Running it in a loop over dozens of semantic models will generate excessive API calls and risk throttling. For bulk inventory across many models, use the admin scan API (`fab api "admin/workspaces/getInfo"`) when tenant-admin access is available, or the cross-workspace catalog via `fab find ... -P type=SemanticModel` for a quick non-admin list. Neither alternative resolves report-to-model dependency edges; `fab find` and the OneLake catalog do not expose lineage. For that you still need either a per-workspace scan (this script's approach) or the official Power BI lineage admin API at `fab api "admin/groups/{ws-id}/lineage"`.

## Interpreting Results

| Field | Meaning |
|-------|---------|
| Report format `PBIR` | Modern format, editable as JSON |
| Report format `PBIRLegacy` | Legacy format, needs conversion to PBIR for direct editing |
| Reports in unexpected workspaces | May indicate copies, forks, or thin reports pointing at a shared model |
| Many downstream reports | High-impact model -- changes require coordination |

## Related Skills

- **`semantic-model`** -- Design, build, refresh, and review models (quality, memory, DAX, design)
- **`refreshing-semantic-model`** -- Trigger and monitor model refreshes
- **`fabric-cli`** (fabric-cli plugin) -- Workspace and item management via `fab` CLI
audit-tenant-settingsSkill

Automatically invoke this skill whenever the user asks about Fabric tenant settings or Power BI tenant settings or auditing tenant settings. You can use this skill if the user mentions "Fabric administration".

fabric-cliSkill

Expert guidance for using the Fabric CLI (`fab`) to fully interact with Fabric workspaces, items, and configuration. Automatically invoke this skill whenever the user mentions "Fabric" or "Power BI Service" or a "Fabric/Power BI workspace".

connect-pbidSkill

TOM and ADOMD.NET guidance via PowerShell for connecting to Power BI Desktop's local Analysis Services instance. Covers model enumeration, DAX queries, metadata modification, annotations, calendar definitions, field parameters, query tracing, DAX library package management (daxlib.org), and the Desktop Bridge for reloading and screenshotting the report canvas. Automatically invoke when the user mentions "Power BI Desktop", "Analysis Services port", "TOM", "ADOMD", "daxlib", "DAX library", "DAX UDF package", or asks to "connect to PBI Desktop", "query PBI Desktop with DAX", "modify PBI Desktop model", "add a measure to PBI", "capture visual queries", "create a field parameter", "validate DAX", "intercept DAX queries", "install daxlib", "add DAX SVG", "add IBCS", "reload the report canvas", "screenshot a report page", "Desktop Bridge", or to work with the model and report in Power BI Desktop together.

pbipSkill

Expert guidance for the Power BI Project (PBIP) file format; project structure, cross-cutting operations (renames, forking), and PBIX extraction/conversion. Automatically invoke when the user mentions PBIP, PBIX, .pbip/.pbism/.platform files, or asks about "PBIP project structure", "PBIP vs PBIX", "thin report vs thick report", "rename a table", "cascade rename", "fork a PBIP project", "convert pbix to pbip", "extract pbix", "what files are in a PBIP", "PBIP encoding", "definition.pbir", or discusses project-level file structure and post-rename verification.

pbir-formatSkill

Format reference for Power BI Enhanced Report (PBIR) JSON schemas and patterns. Automatically invoke when the user asks about PBIR JSON structure, visual.json properties, PBIR expressions, objects vs visualContainerObjects, theme inheritance, conditional formatting patterns, extension measures, bookmarks, field references, filter formatting, query roles, PBIR page structure, report wallpaper, or any PBIR metadata format question.

tmdlSkill

Direct TMDL file authoring and BIM-to-TMDL conversion for semantic models in PBIP projects. Automatically invoke when the user asks to "edit TMDL", "add a measure in TMDL", "TMDL syntax", "fix formatString", "fix summarizeBy", "TMDL indentation", "convert BIM to TMDL", "add a column description", "create a calculated column in TMDL", or mentions .tmdl file editing or BIM-to-TMDL migration.

create-pbi-reportSkill

Step-by-step workflow for creating complete Power BI reports from scratch using pbir CLI. Covers model discovery, report creation, page layout, theme setup, visual placement, field binding, filtering, formatting, validation, and publishing. Automatically invoke when the user asks to "create a new report", "build a report from scratch", "make a dashboard", "set up a report with KPIs", "create an executive dashboard", "add pages and visuals to a new report".

deneb-visualsSkill

Deneb visual creation, Vega/Vega-Lite spec authoring, and Deneb best practices for PBIR reports. Automatically invoke whenever the user mentions "Deneb" in any context, or asks about Vega/Vega-Lite specs in Power BI, Deneb cross-filtering, Deneb interactivity, pbiColor theme integration, Deneb field name escaping, or Deneb rendering issues.