io.github.fabienfrfr/pbix-atlas

السجل الرسمي أخرى

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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package pbix-atlas
Claude Code
claude mcp add pbix-atlas -e 'PBIX_LINEAGE_PORT=8080' -e 'PBIX_LINEAGE_HOST=127.0.0.1' -- uvx pbix-atlas==1.0.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "pbix-atlas": {
            "command": "uvx",
            "args": [
                "pbix-atlas==1.0.0"
            ],
            "env": {
                "PBIX_LINEAGE_PORT": "8080",
                "PBIX_LINEAGE_HOST": "127.0.0.1"
            }
        }
    }
}

متغيرات البيئة

  • PBIX_LINEAGE_PORT Port the server listens on
  • PBIX_LINEAGE_HOST Host interface to bind to

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. 🌐 PBIX‑Atlas
  2. Install
  3. Quick start
  4. Export
  5. Codegen — standalone Python pipeline
  6. HTTP API / MCP server
  7. Architecture
  8. Sample files
  9. Development

🌐 PBIX‑Atlas

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

pip install pbix-atlas
# or
uv add pbix-atlas

Quick start

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

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

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

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

HTTP API / MCP server

uv sync --extra api
uv 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

uv sync --extra dev
uv run pytest
uv build

الأسئلة الشائعة

ما هو io.github.fabienfrfr/pbix-atlas؟

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

كيف أثبّت io.github.fabienfrfr/pbix-atlas؟

يعمل على جهازك. في Claude Code: claude mcp add pbix-atlas -e 'PBIX_LINEAGE_PORT=8080' -e 'PBIX_LINEAGE_HOST=127.0.0.1' -- uvx pbix-atlas==1.0.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.fabienfrfr/pbix-atlas إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.fabienfrfr/pbix-atlas مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.fabienfrfr/pbix-atlas؟

ينشره fabienfrfr. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.