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 整合