/tableau-to-sigma:tableau-to-sigmafrom Tableau → Sigma
Convert a Tableau datasource or workbook into a Sigma data model and matching dashboard. Use when the user has a Tableau datasource, TDS file, or Tableau workbook and wants to recreate it in Sigma. Discovery, calc-field translation, data model + workbook creation via REST API, layout generation, and parity verification — driven by the selected Ruby or Python runtime profile.
Ships in Tableau → Sigma. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
⛔ STEP 0 — MANDATORY environment bootstrap (before any other step)
On the first run on a machine, run the ONE bootstrap command — idempotent, non-interactive, no admin, never echoes credentials:
- macOS / Linux / Git Bash:
bash scripts/bootstrap.sh --workdir <WORK>- Windows PowerShell:
powershell -ExecutionPolicy Bypass -File scripts\bootstrap.ps1 -WorkDir <WORK>Bootstrap selects a supported runtime, installs missing dependencies without admin, and writes
doctor.json+bootstrap.json; both are required. Do not hand-install runtimes or edit PATH. If bootstrap cannot proceed, surface its blocker. Dry run:--check/-Check. Seerefs/environment.md.
⛔ STEP 1 — THE ONE PATH (a single entry point; do not improvise one)
After the bootstrap, always run the orchestrator — it chains every phase in one process and self-gates:
# Use the entrypoint selected in doctor.json: ruby scripts/migrate-tableau.rb --workbook "<name>" --connection <id> # or, when selectedProfile=python: python3 scripts/migrate-tableau.py --workbook "<name>" --connection <id> …Supplied
.twb+ Tableau MCP, no PAT: use the Ruby entrypoint with--twb FILE --out WORK --connection ID. Readrefs/mcp-source.md: fill its scoped evidence request, seal exports, then resume. No Tableau REST calls. Sigma CLI auth uses the shared provider.
- Pass the quoted Tableau
/#/views/…share URL to--workbook. It resolves the LUID by contentUrl; do not hand-roll name filters or page the workbook list.- Flag cheatsheet — use the EXACT flags for the selected entrypoint:
migrate-tableau.rb --out DIR(--workdiris an alias);migrate-tableau.py --out DIRuses the same workdir flag;validate-spec.rb <spec.json> --type dm|workbook(spec is a positional arg, no--spec);put-layout.rb --workbook ID(not--workbook-id), readingSIGMA_API_TOKENfrom the env.- Do NOT hand-drive the per-phase scripts or hand-author DM/workbook JSON UNLESS an orchestrator STOP explicitly routes you there (e.g. "CONVERTER STOP", the exit-4 handoff). The script map is not a menu — à-la-carte scripts are the #1 way runs go inconsistent.
- "Done" is not something you decide — it is a file on disk. The migration is complete only when the selected runtime's completion gate (
verify-complete.rborverify-complete.py) exits 0 / prints ✅ DONE. A clean PASS 1 (exit 12) is NOT done — it means "run--finalize". Never report success or write a completion summary before. Completion also requires complete accounting: every formula informula-audit.jsonand every object insource-object-census.jsonhas one terminal disposition inMIGRATION_REPORT.md/migration-result.json.- This is a PRODUCTION migration, not a demo. The bar is EXACT parity against the same warehouse, always. At a wall: follow the printed STOP/handoff, or surface the blocker plainly and stop — NEVER a third "lighter/simplified" path; only the user may descope. Verbatim rule:
refs/operating-contract.md§Never negotiate fidelity down.- A routing STOP instructs the agent to perform the named repair and resume. It is not completion or an automatic handoff to a human. See
refs/gates.md.- At the exit-4 handoff, PATCH the auto-built
<WORK>/wb-spec.json— do NOT rewrite it (a from-scratch rewrite drifts controlIds and fails control-lint wholesale — the #1 way this handoff spirals; prefer--master-colfor master-level calcs). Full handoff discipline:refs/gates.md§Exit-4.- Credentials: the orchestrator stops at step 0 with both supported routes: preferred one-time
scripts/browser-login.sh, or the selected runtime'sscripts/setup.rb/scripts/setup.pyfor unattended client credentials. Use one of those rather than working around auth (refs/environment.md§Credentials).
Runtime selection
autoprefers Ruby and falls back to Python + Node when Ruby is unavailable. Explicit--runtime-profile pythonskips Ruby. Full contract and command:PYTHON_RUNTIME.md.
Model fit & vision —
refs/model-fit.md(read before Phase 0 on any multi-dashboard workbook): pixel-fidelity claims require image input; very-large workbooks on non-top-tier models → ask the user once; a text-only agent records the visual verdict as not-executable, neverpass.
🚧 GATE convention. A 🚧 GATE step is backed by a script that fails the run if the step was skipped — an artifact (a file on disk) plus a downstream check that refuses to proceed without it. Catalog:
refs/gates.md.
Mandatory pre-read — exactly ONE file: refs/operating-contract.md (the
non-negotiable guardrails: obtain the source render + calcs, build from the
source's own logic, render + value-check EVERY page, never ship empty or waive
silently, don't spin). Everything else is read at the phase that consumes
it — the phase table below names the refs per phase.
(Per-script catalog: refs/script-map.md.)
For canonical workbook spec shape (element kinds, controls, formulas,
formatting), defer to the companion sigma-workbooks skill
(sigma-authoring plugin — install it alongside; this converter assumes
it); this skill restates only Tableau-conversion-specific patterns.
Restate the user's request as <workdir>/mission.json (schema + rules +
kickoff template in MIGRATION_REQUEST.md): source, connection,
destination, landing target, workbook scope — each marked stated or
inferred. Any inferred field → STOP and confirm with the user before
building (field evidence: invented scope has invalidated entire runs). The
orchestrator consumes a STATED dashboard scope (E9.6: scope.dashboards,
or a single-view /#/views/ URL in scope.value) — it threads onto
--dashboard end-to-end; see refs/orchestration.md §Single-invocation flow.
Run the bootstrap FIRST (STEP 0 banner above). It ends with the doctor
(doctor.json + the bootstrap.json sentinel); both orchestrators refuse to
start until both pass. Re-verify: bash scripts/doctor.sh --workdir <WORK>
(PowerShell: scripts\doctor.ps1 -WorkDir <WORK>). Gate impossible in your
environment (e.g. a sandbox) → waive explicitly and name it in your report:
migrate-tableau.rb … --skip-doctor-gate "<reason>".
scripts/intake.rb)The Ruby profile can use ruby scripts/intake.rb --workdir <WORK> --tool tableau-to-sigma --mode live --source "<workbook>" resolves the Sigma warehouse connection a SINGLE time
(caches <WORK>/connection.json, read by the orchestrator when --connection
is omitted — point --out at the same <WORK>). With multiple connections it
asks — it never guesses; --rank-workbook-id <LUID> auto-resolves by
warehouse fingerprint. --source keys front-door triage: retire-tagged in the
assessment plan (--plan, or auto-found <WORK>/migration-plan.json) →
refuse, exit 7 — override only with an attributable --triage-override "<who>: <why>" (ledgered in offramps.jsonl, never silent);
low-rank/blocked/consolidation WARN and proceed; no plan → one offer line,
never a block. Full flags, precedence, ranking, triage:
refs/phase-0-scope.md §Step 0.1. Credentials: refs/environment.md
§Credentials.
The Python profile requires --connection explicitly and performs strict
GET-only reuse discovery inside migrate-tableau.py; it never guesses among
multiple compatible objects.
Invocation: use a tool timeout long enough for the scripted phases, or async execution. Image/verdict checkpoints return immediately by default: perform the named action, then resume the same workdir.
--waitis optional (tool timeout >= its budget); inner exits pass through. Exit 26 means the child is STILL ALIVE: inspect its PID/log andmigration-process.json, and do not launch another run until it exits. Exit 28 refuses a second writer to the same workdir. No gates are waived.
# PASS 1 — discover → gap gate → DM-reuse scan → DM → workbook → layout → parity plan
ruby scripts/migrate-tableau.rb \
--workbook "<name>" --connection <SIGMA_CONNECTION_ID> --folder <SIGMA_FOLDER_ID> \
[--db <DB> --schema <SCHEMA>] [--name '<prefix>'] [--row-scale 1.5] \
[--reuse-dm [ID]] [--force] [--yes]
# … gap scan writes <workdir>/formula-audit.json + source-object-census.json …
# … pass 1 auto-fills <workdir>/parity-actuals.json (collect-parity-actuals.rb);
# no MCP needed; pass 1 prints how to supply any chart it could not export …
# PASS 2 — finalize: phase6 verify + cleanup-orphans + census-aware report/gate
ruby scripts/migrate-tableau.rb --workbook "<name>" \
--finalize --actuals <workdir>/parity-actuals.json [--allow-missing-tiles N]
# … writes MIGRATION_REPORT.md + migration-result.json; incomplete accounting fails …
--db/--schema(always together) — there is NO default database. The orchestrator resolves: your flags → the landing manifest → the workbook's own<connection dbname=/schema=>attributes → FQN / virtual-connection names (the catalog decides) — and hard-stops naming the flags, never guessing.
PASS 1 has two agent handoffs: (1d, exit 18) Read the dashboard PNG and verify
<workdir>/png-read.json; (tail, exit 12) discharge the visual verdict and finalize. Reuse the same workdir after the previous process exits. If your runner can act concurrently, opt into bounded waits withSIGMA_PNG_READ_TIMEOUT_S=480andSIGMA_VISUAL_VERDICT_TIMEOUT_S=480. Both default to 0 (return immediately, not skip verification).execution-identity.json/execution-history.jsonlrecord the executed build; inspect them after an update or reported code drift.
Converter backend — LOCAL by default (
converter/tableau.mjs, no network); the hosted converter uploads the.twband runs ONLY with explicit--converter hosted/SIGMA_CONVERTER_ALLOW_HOSTED=1. No converter at all? Re-enter the GATED spine — never hand-POST raw specs. Mechanics + spec re-entry placeholders:refs/orchestration.md§Converter backend.
Parity is EXACT for warehouse-backed migrations — never blame "drift." Sigma queries the same warehouse Tableau reads; a value gap is a real bug (missing view filter / NULL bucket / ungrouped table / wrong aggregate), not freshness.
extract-modeis only forhasExtracts=trueworkbooks, explicitly flagged. Do not declare GREEN while a table renders base-row-count detail or a NULL-dominant bucket — runscripts/lib/preflight_lint.rbfirst.
Chains the scripted spine (discover → gap scan → columns → DM reuse/build/POST
→ workbook → layout → parity → cleanup + final gate), STOPS with exact
instructions wherever agent judgment is genuinely required, and prints a
PHASE TIMINGS line at every terminal exit; Phase 1 is interleaved. Exit
codes (10/11/12/16/4/3/14/0 + 18 wait deadline, 19 scope mismatch, 26
--wait budget w/ run alive): refs/gates.md + refs/orchestration.md
§Single-invocation flow. Most-misread code: 12 = pass 1 done, NOT
done-done — run --finalize.
refs/diagnostics.md: local timers and ZIPs.
migrate-tableau.rb and migrate-tableau.py compose the selected profile
(STEP 1) — run exactly the entrypoint recorded in doctor.json. Invoke another
script directly only when an orchestrator STOP
tells you to. (Redirect — E9 diet: the one-line index AND full per-script
contracts live in refs/script-map.md.)
assert-phase6-ran.rb / assert-phase6-ran.py)The conversion hard gate. (Redirect — E9 diet: the full exit-code table moved
verbatim to refs/gates.md.) Subagent flows MUST call this gate as their
final step; it exits 0 only when ALL gates pass.
⛔ NEVER hand-roll a signin
curl— for Sigma OR Tableau. The scripts are the sanctioned AND classifier-friendly route. One signin attempt only — Tableau Cloud invalidates a PAT after 4 failed signins;get-tableau-token.shruns exactly once, never in a retry loop. Setup, env vars, token lifetimes, PAT-vs-MCP modes, hand-driven discovery:refs/environment.md§Credentials; endpoints + signin gotchas:refs/tableau-rest.md.
This spine is the map: every phase, its one command, its gate, and the refs to read at that phase (load nothing ahead of its phase). The orchestrated path runs 0a–6 for you; reach for a phase ref when you drive a phase by hand or need to understand why it stopped.
| # | Phase | One command / action | Gate → artifact | Read at this phase |
|---|---|---|---|---|
| −1 | Mission intake | write mission.json | inferred fields confirmed | MIGRATION_REQUEST.md |
| 0 | Preflight + intake | bootstrap.sh; doctor.sh; intake.rb | bootstrap.json + doctor.json + connection.json | refs/environment.md, refs/model-fit.md, refs/orchestration.md (contexts) |
| 0a | Gap scan (mandatory) | scan-workbook-gaps.rb | *-gaps-report.json + formula-audit.json + source-object-census.json — ❌ features → scout or --force; every source formula/object starts an accounting row | refs/phase-0-scope.md, refs/coverage-matrix.md, refs/blending.md (blends) |
| 0b | Destination + mode (ask) | pick-destination.rb | folder id + conversion mode | refs/phase-0-scope.md |
| 0c | Scope/cost sign-off | estimate-cost.rb --workdir | cost-estimate.json + run-state ack (cost_estimate_acknowledged) | refs/phase-0-scope.md, refs/model-fit.md §3, refs/performance.md |
| 1 | Discover the source | tableau-discover.rb (PAT) or MCP | get-workbook.json, views/*.csv, .twb | refs/phase-1-discover.md, refs/tableau-rest.md, refs/multi-datasource.md, refs/object-model.md, refs/story-points.md, refs/extract-landing.md |
| 1d | 🚧 Dashboard read + anchors | get-view-image (solo) → Read → write png-read.json + source-anchors.json | 🚧 png-read.json (assert-dashboard-read.rb) + ≥5 anchors (final gate exit 18) | refs/phase-1-discover.md, refs/source-anchors.md, refs/twb-zone-mapping.md |
| 1.5 | Reuse an existing DM | find-or-pick-dm.rb | dm-match.json (reuse-first) | refs/phase-1_5-dm-reuse.md, refs/modeling-strategy.md |
| 2 | Warehouse column names | discover-warehouse-columns.rb | real column ids | refs/phase-2-columns-filters.md, refs/column-gotchas.md |
| 2.5 | View-level filters (mandatory) | detect from CSV distinct values | filters applied at the right grain | refs/phase-2-columns-filters.md |
| 3 | Build the DM spec | author → validate-spec.rb --type datamodel | clean dm-spec.json; complete relationship-coverage.json; attributed sql-provenance.json; join-plan.json probed (exit 23); semantic-edits.json proven (exit 27) | refs/phase-3-datamodel.md, refs/data-model-spec.md, refs/window-functions.md, refs/blending.md, refs/multi-datasource.md |
| 4 | POST the DM + read back | post-and-readback.rb --type datamodel | dm-ids.json (server ids) | refs/phase-4-post-dm.md |
| 5 | Build workbook | build-charts-from-signals.rb → dashboard-coverage.rb → post-and-readback → layout | every visible in-scope dashboard has a page; preflight_lint clean; layout places each element once and is the LAST write; LOD/aggregation audits resolved | refs/phase-5-workbook.md, refs/workbook-code-release-gaps.md, refs/chart-patterns.md, refs/layout-grid.md, refs/story-points.md |
| 6 | 🚧 Parity + anchors + ground truth + visual | phase6-parity.rb; verify-anchors.rb; ground-truth trio; then finalization and the gate sequence | 🚧 parity-final.json PASS + anchors-verdict.json + per-tile numeric_parity (exit 25) + recorded visual verdict + full run-state.json + MIGRATION_REPORT.md / migration-result.json with complete source-object and formula accounting | refs/phase-6-parity.md, refs/source-anchors.md, refs/ground-truth-oracle.md, refs/gates.md, refs/migration-report-format.md, refs/blind-grader-brief.md, refs/visual-similarity.md, refs/control-parity.md, refs/orchestration.md (verifier) |
| 5g | RCF fidelity loop | fidelity-loop.rb render → compare → fix until clean (Sigma MCP present: fix via SDK, then sdk-export) | 🚧 (default-on) fidelity-ledger.json no unresolved spec-fixable deltas (gate 8d) | refs/phase-5g-rcf.md, refs/phase-5g-sdk-hybrid.md, refs/fidelity-rubric.md, refs/fidelity-recipes.md, refs/layout-visual-qa.md |
| E | Enhance (opt-in) | enhance-scan.rb → enhance-apply.rb | cloned "— Enhanced" workbook | refs/phase-e-enhance.md, refs/postpublish-interactivity.md |
| — | Security RLS/CLS | detect always; apply opt-in | apply_sigma_rls.py | refs/security-rls.md |
On ANY nonzero exit or waiver: refs/gates.md. On a STOP naming a script:
refs/script-map.md. On a failure loop: refs/troubleshooting.md.
refs/gates.md)resolve-project.rb
first. Exit 0 → migrate exactly what it lists; exit 2 → STOP and ask
with the printed candidates — never guess (a wrong guess field-cost 6
hours). Rationale: refs/phase-1-discover.md §1a.png-read.json (EVERY tile + kind) AND transcribe printed numbers
into source-anchors.json exactly as printed, ≥5, anchor EVERY tile
(else coverage_waivers at transcription). Phase 6 verifies each anchor
(final gate exit 18) — field migrations shipped wrong numbers behind
passing visual verdicts. Schema: refs/source-anchors.md; gate +
draft-seeding: refs/phase-1-discover.md.refs/blind-grader-brief.md, five parameters, NOTHING else), a 2nd
grader when told, recorded via record-visual-check.rb --blind-grade; a
YELLOW finish offers GREEN once (refs/gates.md §Finish). Protocol:
refs/phase-6-parity.md §6f. Not done until
assert-phase6-ran.rb exits 0, then verify-complete.rb prints ✅ DONE.refs/gates.md.degradation-ledger.json; any scope
cut caps at PARTIAL; verify-complete.rb exits 6 if your report contradicts
the derivation — quote the ledger verbatim. Full model: refs/gates.md.refs/security-rls.mdRLS/CLS is never silently dropped and never silently ported — the converter
only detects and reports (result.security[]); this skill provisions + applies
AFTER the model is posted (non-empty → security.json; ask Port
(recommended) / Customize / Skip via apply_sigma_rls.py; Skip is loud —
all rows visible to everyone). Full flow + the
USERNAME()/ISMEMBEROF/USERATTRIBUTE mapping: refs/security-rls.md.
MIGRATION_REQUEST.md (opens in a new tab)PYTHON_RUNTIME.md (opens in a new tab)QUICKSTART.md (opens in a new tab)converter/PROVENANCE.json (opens in a new tab)converter/tableau.mjs (opens in a new tab)learned/starter-rules.yaml (opens in a new tab)refs/app-recommendation-signals.md (opens in a new tab)refs/blending.md (opens in a new tab)refs/blind-grader-brief.md (opens in a new tab)refs/chart-patterns.md (opens in a new tab)refs/column-gotchas.md (opens in a new tab)refs/composition-recipe.md (opens in a new tab)refs/control-parity.md (opens in a new tab)refs/coverage-manifest.json (opens in a new tab)refs/coverage-matrix.md (opens in a new tab)refs/data-model-spec.md (opens in a new tab)refs/diagnostics.md (opens in a new tab)refs/element-kinds.md (opens in a new tab)refs/environment.md (opens in a new tab)refs/extract-landing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub sigmacomputing/sigma-migration-skills --plugin tableau-to-sigma3 skills in this plugin
/tableau-assessmentTake inventory of a Tableau Cloud site and produce a migration-readiness readout — environment counts, licenses, datasource mix, refresh history, per-workbook usage, per-workbook complexity (via .twb gap-scan), and a value/cost-ranked migration shortlist. Use when a user wants to scope a Tableau→Sigma migration, audit BI sprawl, or pick which workbooks to convert first. Lightweight (~90s) MCP-driven pre-scoping; complements Hakkoda's deeper Assessment App rather than replacing it./tableau-vds-to-cdwExtract data from a published Tableau datasource via the VizQL Data Service (VDS) API and land it in a cloud data warehouse — Snowflake or Databricks — so Sigma can read it. Use when a user wants to pull a Tableau-managed dataset into the warehouse (one-shot or scheduled refresh) without exporting CSV by hand. Optionally schedule ongoing refresh (Snowflake Task / Databricks Workflow).