{
  "markdown": "# Tableau Workbook Auditor\n\nFind what is wrong with any Tableau workbook (`.twbx`), and map every dependency inside\nit, **entirely in your browser**. Unused fields, duplicate calculations, performance\nproblems, full calculated-field lineage, filters, dashboards and stored SQL. Nothing is\nuploaded, stored, or sent anywhere.\n\n🔗 **Live:** https://tableau-lineage.com\n📦 **MCP server:** [`tableau-lineage-mcp`](https://www.npmjs.com/package/tableau-lineage-mcp)\n\n---\n\n## Why\n\nInheriting someone else's Tableau workbook means reverse-engineering dozens of\ncalculated fields by hand to answer one question: where does this number come from, and\nwhat breaks if I change it?\n\nTwo more questions come up just as often and have no free answer:\n\n- **What in here is dead?** Tableau has no built-in way to list unused fields; the\n  request has been open on the community forum since 2015.\n- **Why is it slow?** Tableau's Workbook Optimizer needs a Creator licence, and Catalog\n  needs Data Management on Server or Cloud.\n\nThis reads the workbook file itself and answers all three, free, with no licence and no\naccount. Because workbooks often carry sensitive data, everything runs locally: the\n`.twbx` never leaves your machine, which is a property of the architecture rather than a\npromise (there is no server to send it to).\n\n## Features\n\n### Audit\n\n- **Dead weight**: every field, parameter and calculation nothing uses, graded by\n  confidence (`unused`, `likely-unused`, `referenced-in-comment`) with the reason spelled\n  out. Reported as candidates rather than certainties, because a workbook file cannot\n  prove a field is unreferenced everywhere.\n- **Duplicate calculations**: identical formulas under different names, and the more\n  dangerous case of the same name carrying different formulas.\n- **Performance lint**: 15 static rules over what the file actually contains. Heavy and\n  nested LODs, long calculations, string-heavy work, too many quick filters, missing\n  context filters, live connections, non-fixed dashboard sizing, dense dashboards,\n  orphan worksheets.\n\n### Lineage\n\n- **Interactive dependency graph** (vis-network): calculated fields, raw fields,\n  parameters and worksheets as nodes; edges show what feeds what. Cluster by data source,\n  search, highlight chains, zoom and pan.\n- **Searchable data dictionary**: every formula grouped by data source, plus a worksheets\n  section.\n- **Seven clickable metrics**: data sources, calculated fields, raw fields, parameters,\n  LOD calcs, table calcs, filters.\n\n### Structure\n\n- **Filters, decoded**: every filter deduplicated across worksheets, with its kind\n  (categorical / quantitative / relative-date), context-filter status, stored member\n  selections and ranges, and a per-worksheet breakdown. Data-source filters are called out\n  separately.\n- **Dashboards**: which worksheets each dashboard places, its fixed size and device\n  layouts, plus sheets that sit on no dashboard and sheets that are hidden.\n- **Data provenance**: extract or live, connection class / database / server, published\n  (`sqlproxy`) sources, and refresh history where the workbook records it.\n- **Stored SQL**: every Custom SQL query (full text), Initial SQL statement,\n  stored-procedure reference with parameters, and `RAWSQL_*` calculation, each mapped to\n  the connection it targets. Runtime-generated live-connection queries are not stored in\n  workbook files, so they are explicitly out of scope.\n\n### Compare versions\n\nDrop in up to five versions of the same dashboard and get a **semantic diff**: which\ncalculations were added, removed, renamed or edited, and for every edit the downstream\nfields it can break, plus changed parameters, filters, worksheets, dashboards, data\nsources and SQL. Reformatting a calculation is not reported as a change, and a field that\ndisappears while an identical formula appears under a new name is reported as a rename.\n\nA git diff of two `.twbx` files cannot do this: the workbook is one large XML blob where\nlayout coordinates and regenerated ids swamp the handful of real changes.\n\n### Exports\n\nAll generated in-browser, from the same parsed model:\n\n- **Interactive HTML report**: self-contained and offline-ready (vis-network inlined),\n  watermarked with the tool and the author.\n- **Markdown handover document**: the workbook written up (metrics, audit, dashboards,\n  data sources, parameters, filters, every formula, stored SQL) for a ticket, a wiki or a\n  README. Also the format an LLM reads best when someone asks about the workbook later.\n- **CSV** field inventory (including which worksheets use each field) and **JSON** of the\n  complete model, audit included.\n\n### Everything else\n\n- **Private by architecture**: `.twbx` parsing (unzip + XML) happens client-side. No\n  backend, no upload, no cookies. Analytics is an anonymous, aggregate page-view count.\n- **Workbooks up to 500 MB**: only the workbook XML is decompressed; the packaged data\n  extract is never touched.\n- **Accessible**: keyboard navigation, focus management, AA contrast, reduced-motion\n  support, and a text dictionary as an equivalent to the canvas graph.\n- **Seven UI languages** for the core interface strings (buttons, labels, status\n  messages), with English fallback. Longer explanatory copy is English only.\n\n## How it works\n\n```\n.twbx (a ZIP)\n  └─ fflate unzips ONLY the .twb entry  ──►  DOMParser reads the XML once\n        ├─ extractor.ts        lineage model: calcs, dependencies, params, stats\n        ├─ filterExtractor.ts  filters + per-worksheet usage\n        ├─ sqlExtractor.ts     Custom SQL, Initial SQL, stored procs, RAWSQL\n        ├─ dashboardExtractor  dashboards, hidden/orphan sheets, provenance\n        ├─ audit.ts            dead weight, duplicates, performance lint\n        └─ diff.ts             semantic diff between two parsed workbooks\n              ├─ in-app: a sandboxed <iframe srcdoc> report\n              └─ exports: HTML / Markdown / CSV / JSON, all from the same model\n```\n\nThe packaged data extract inside a `.twbx` is never decompressed, which is why a 500 MB\nworkbook is fine and why the tool cannot see your rows even in principle.\n\n### Correctness notes\n\nThe analytical core is a TypeScript port of the original Python service, with fixes that\neach exist because the naive version was wrong on a real workbook:\n\n1. **Parameter references by caption.** Formulas reference parameters by caption\n   (`[Parameters].[Survival Target (Months)]`) while the internal name differs\n   (`[Survival Benchmark]`). The original leaked a phantom `Parameters` dependency.\n2. **Table-calc detection by token, not substring.** `TOTAL` inside `[total_views]` was\n   flagging ordinary fields as table calcs. Now matched as whole function calls; LOD\n   detection is brace-anchored.\n3. **Comments and string literals are stripped before dependency scanning.** A field name\n   mentioned in a `//` comment is not a dependency, and treating it as one made unused\n   fields look used.\n4. **Nodes are keyed by data source, not name alone.** Two data sources can both define\n   `[Sales]`; merging them fused unrelated lineage into one node.\n5. **Captions resolve document-wide.** Workbooks built on published data sources keep\n   captions only in the worksheet dependency stubs, so filters and worksheet fields\n   surfaced raw keys like `Calculation_5431234567890123`.\n6. **A `<datasources>` block is only real at the workbook root.** Every worksheet carries\n   a reference list of the same shape, which counted one data source thirteen times on a\n   twelve-sheet workbook.\n\nAll are covered by tests (`npm test`, `npm run test:core`).\n\n## Tech stack\n\nVite · React 19 · TypeScript · Tailwind CSS · [fflate](https://github.com/101arrowz/fflate)\n(unzip) · native DOMParser (XML) · [vis-network](https://visjs.github.io/vis-network/)\n(graph). No backend.\n\n## MCP server (for AI assistants)\n\nThe same engine ships as an MCP server, so Claude, Cursor and other MCP clients can read\nand audit workbooks straight from your disk. Still 100% local, nothing uploaded.\n\n**Claude Desktop:** [download the extension](https://github.com/andey0Saikiran/tableau-lineage/releases/latest/download/tableau-lineage.mcpb)\nand double-click it. One click, no terminal and no Node setup.\n\n**Claude Code** (installs the MCP plus a skill that knows when to use it):\n\n```\n/plugin marketplace add andey0Saikiran/tableau-lineage\n/plugin install tableau-lineage@tableau-lineage\n```\n\n**Cursor and other MCP clients:**\n\n```bash\nclaude mcp add tableau-lineage -- npx -y tableau-lineage-mcp\n```\n\nEleven tools: `analyze_workbook`, `audit_workbook`, `diff_workbooks`,\n`list_calculated_fields`, `get_field`, `trace_dependencies`, `list_parameters`,\n`get_lineage_graph`, `list_sql_queries`, `list_filters`, `list_worksheets`. Full docs in\n[`mcp/`](mcp/).\n\nThings worth asking it:\n\n- \"Audit this workbook and tell me what is safe to delete.\"\n- \"What changed between these two versions, and what does it break?\"\n- \"Which sheets filter on Region, and what values are selected?\"\n- \"Write a data dictionary for this workbook.\"\n\n## Run locally\n\n```bash\nnpm install\nnpm run dev          # http://localhost:5173\n```\n\nOther scripts:\n\n```bash\nnpm run build        # typecheck + production build + pre-render to dist/\nnpm run preview      # serve the production build\nnpm run typecheck    # tsc --noEmit\nnpm test             # Vitest: extractors, audit, diff, exports\nnpm run test:core    # extractor parity + regression tests (Node)\nnpm run prerender    # re-run the static pre-render over an existing dist/\n```\n\nThe build pre-renders the landing page with `react-dom/server` and injects the markup\ninto `dist/index.html`, so crawlers get real content instead of an empty `<div id=\"root\">`.\nIt stays a fully static site: there is no server at build time or run time.\n\n## Deploy (Cloudflare Workers static assets)\n\nThis is a static site; the `dist/` folder can go on any static host. The live site runs on\n**Cloudflare Workers static assets**, configured by `wrangler.jsonc` in this repo:\n\n```jsonc\n{ \"name\": \"tableau-lineage\", \"assets\": { \"directory\": \"./dist\" } }\n```\n\n1. Push this repo to GitHub.\n2. Cloudflare dashboard → **Workers & Pages → Create → Import a repository** → select the\n   repo. Cloudflare reads `wrangler.jsonc` and serves `dist/` as static assets.\n3. Build settings:\n   - **Build command:** `npm run build`\n   - **Deploy command:** `npx wrangler deploy`\n4. Every push to `main` builds and deploys automatically.\n5. **Custom domain:** the Worker → Settings → Domains & Routes → add `tableau-lineage.com`\n   (leave the subdomain field blank for the apex). `www` is a proxied CNAME to the apex\n   plus a redirect rule. Moving the domain's nameservers to Cloudflare gives automatic\n   HTTPS.\n\nNote: this is Workers, not Pages. A Pages project built from the same repo would deploy a\nsecond, parallel copy of the site.\n\n`public/_headers` ships a security baseline and a Content-Security-Policy that restricts\noutbound connections to this origin and Cloudflare's analytics only, which is what makes\nthe \"your data never leaves your browser\" promise enforceable.\n\n## Analytics (cookieless)\n\nVisitor counts come from **Cloudflare Web Analytics**: cookieless, no personal data.\n\n1. Cloudflare dashboard → **Web Analytics → Add a site** → enter the hostname.\n2. Copy the beacon token and paste it into the commented `<script>` in `index.html`.\n3. View numbers in the Cloudflare dashboard → Web Analytics.\n\nThat single page-view beacon is the only data collected.\n\n## Demo workbook\n\n`public/demo.twbx` powers the \"try a sample workbook\" button. Replace it with any `.twbx`\nyou'd like to feature as the default example.\n\n## License\n\n[MIT](LICENSE) © 2026 Sai Kiran Andey\n\nBuilt by **Sai Kiran Andey**.\n",
  "bytes": 11739,
  "sha": "4a907bb22c6b4e8d69644c860c3305fe957e60dab6946bbd49e89e8c71cc918f",
  "repo_slug": "andey0saikiran/tableau-lineage",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_andey0saikiran_tableau_lineage_567788e6/readme"
}