Bidirectional data lineage graph for Power BI (.pbix) files, from source to display
PbixAtlas is an Universal lineage graph for Power BI .pbix files: source to visual field in one traversable graph.
source (HTTP, OData, SQL, file...) --> Power Query (M)
--> column / calculated column --> measure (DAX)
--> field displayed in a report visual
pip install pbix-atlas
# or
uv add pbix-atlas
from pbix_atlas import LineageGraphBuilder, upstream, downstream, print_tree, find_nodes
graph = LineageGraphBuilder().build("my_report.pbix")
find_nodes(graph, "customer_name")
print_tree(graph, "visual_field::my_report.pbix::Page1::16::customer_name", direction="upstream")
print_tree(graph, "source::odata::example.com/odata/", direction="downstream")
from pbix_atlas import export_graphml, export_nodes_csv, export_edges_csv, graph_summary
graph_summary(graph) # {'query': 70, 'column': 183, ...}
export_graphml(graph, "lineage.graphml") # Gephi / yEd
export_nodes_csv(graph, "nodes.csv")
export_edges_csv(graph, "edges.csv")
Generates a single Python file reproducing a report's full chain: source → extraction → Power Query → semantic model → Vizro dashboard. The M source is executed at runtime by the built-in interpreter, not pattern-matched. Unimplemented functions raise MRuntimeError (no silent stubs).
pip install "pbix-atlas[codegen]"
pbix-atlas-codegen my_report.pbix -o pipeline.py
from pbix_atlas import generate_python_pipeline
generate_python_pipeline("my_report.pbix", "pipeline.py")
uv sync --extra api
uv run pbix-atlas # http://127.0.0.1:8080
POST /graphs, /search, /upstream, /downstream, /tree, /export, /codegenhttp://127.0.0.1:8080/mcp/PBIX_LINEAGE_HOST, PBIX_LINEAGE_PORT| Module | Responsibility |
|---|---|
models.py | Node/edge types and shared data structures |
sources.py | Physical source detection (configurable patterns) |
pbix_model.py | Adapter isolating from pbixray |
m_lexer.py / m_parser.py | Built-in M tokenizer and parser |
m_interpreter.py | M runtime interpreter + stdlib |
dax_translate.py | DAX → Python (supported subset) |
dax.py | DAX reference parsing |
mquery.py | Power Query dependencies (table-level) |
layout.py | Internal Report/Layout format parsing |
graph_builder.py | Orchestrator: builds the networkx.DiGraph |
navigation.py | Upstream/downstream traversal, search, export |
codegen.py | Python pipeline code generation |
api/app.py | FastAPI + MCP mount (FastMCP) |
uv sync --extra dev
uv run pytest
uv build
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx pbix-atlasMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-fabienfrfr-pbix-atlas": {
"command": "uvx",
"args": [
"pbix-atlas"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.fabienfrfr/pbix-atlas works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.