Pbix Atlas

io.github.fabienfrfr由 GitHub 账号 fabienfrfr 发布v1.0.0更新于 Oct 24, 2026

Bidirectional data lineage graph for Power BI (.pbix) files, from source to display

发布方自己的服务:Red Atlas Api

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

为 Power BI .pbix 文件构建可遍历的数据血缘图,从数据源经 Power Query 与 DAX 一直追踪到报表视觉对象字段。

可以做什么
PbixAtlas 解析 Power BI .pbix 文件并构建双向血缘图,连接物理数据源(HTTP、OData、SQL、文件)、Power Query(M)步骤、列、计算列、DAX 度量值以及报表视觉对象中显示的字段。它提供搜索、上游与下游遍历、树形打印,以及导出为 GraphML 或节点/边 CSV。它还能生成独立的 Python 流水线,复现从数据源到 Vizro 仪表板的完整链路,并用内置解释器执行 M 源码。
适用场景
适合需要理解或记录 Power BI 报表数据来源、评估数据源或度量值变更影响,或把报表逻辑转成 Python 流水线的场景。面向审计 Power BI 模型的分析师和工程师,而非通用 BI 查询。
运行要求
作为本地 Python 包运行(pip install pbix-atlas 或 uv add pbix-atlas);HTTP/MCP 服务器通过 uv run pbix-atlas 启动,绑定 PBIX_LINEAGE_HOST 与 PBIX_LINEAGE_PORT。代码生成需要 codegen 附加组件。仅限桌面端;未声明身份验证。
安装前请注意
该服务器读取 .pbix 文件,其中数据源可能内嵌凭据或连接字符串,因此生成的血缘图和导出文件可能暴露数据源端点与模型细节。代码生成功能会在运行时通过内置解释器执行 M 源码,生成的流水线应作为代码先行审查再运行。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Pbix Atlas,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🌐 PBIX‑Atlas

[PyPI] [GitHub] [CI] [MCP Registry]

Full lineage graph for Power BI — from source to visual field

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

Install

bash
pip install pbix-atlas# oruv add pbix-atlas

Quick start

python
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")

Export

python
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 / yEdexport_nodes_csv(graph, "nodes.csv")export_edges_csv(graph, "edges.csv")

Codegen — standalone Python pipeline

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).

bash
pip install "pbix-atlas[codegen]"pbix-atlas-codegen my_report.pbix -o pipeline.py
python
from pbix_atlas import generate_python_pipeline
generate_python_pipeline("my_report.pbix", "pipeline.py")

HTTP API / MCP server

bash
uv sync --extra apiuv run pbix-atlas    # http://127.0.0.1:8080
  • REST: POST /graphs, /search, /upstream, /downstream, /tree, /export, /codegen
  • MCP (streamable HTTP): http://127.0.0.1:8080/mcp/
  • Env vars: PBIX_LINEAGE_HOST, PBIX_LINEAGE_PORT

Architecture

ModuleResponsibility
models.pyNode/edge types and shared data structures
sources.pyPhysical source detection (configurable patterns)
pbix_model.pyAdapter isolating from pbixray
m_lexer.py / m_parser.pyBuilt-in M tokenizer and parser
m_interpreter.pyM runtime interpreter + stdlib
dax_translate.pyDAX → Python (supported subset)
dax.pyDAX reference parsing
mquery.pyPower Query dependencies (table-level)
layout.pyInternal Report/Layout format parsing
graph_builder.pyOrchestrator: builds the networkx.DiGraph
navigation.pyUpstream/downstream traversal, search, export
codegen.pyPython pipeline code generation
api/app.pyFastAPI + MCP mount (FastMCP)

Sample files

Development

bash
uv sync --extra devuv run pytestuv build

来源:README.md,提交 3b489b6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Atlas 集成