/qlik-to-sigma:qlik-to-sigmafrom Qlik → Sigma
Convert a Qlik Sense / Qlik Cloud app into a Sigma data model and matching workbook. Use when the user has a Qlik Cloud tenant/app and wants to recreate it in Sigma. Discovery via qlik-cli (Engine + REST) or an offline corectl unbuild folder, Qlik-expression → Sigma-formula translation via the local vendored convert_qlik_to_sigma converter (MCP tool only as a manual fallback), data model + workbook creation via the Sigma REST API, and parity verification against the source warehouse. Requires Qlik access or a corectl export, plus Sigma API credentials and a Sigma warehouse connection; MCP and direct warehouse credentials are not required. Supports Ruby and no-Ruby Python runtime profiles; both require Python and Node.
Ships in Qlik → 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.
First run — bootstrap before anything else. Use one workdir throughout:
bash scripts/bootstrap.sh --workdir <WORK>(macOS/Linux/Git Bash) orpowershell -ExecutionPolicy Bypass -File scripts\bootstrap.ps1 -WorkDir <WORK>(Windows). To require the supported no-Ruby path, add--runtime-profile python/-RuntimeProfile python; recheck withbash scripts/doctor.sh --runtime-profile python --workdir <WORK>orscripts\doctor.ps1 -RuntimeProfile python -WorkDir <WORK>. The Python profile requires Python + Node, not Ruby.autoprefers Ruby and falls back to Python when Ruby is unavailable. Full commands:PYTHON_RUNTIME.md. General environment details:refs/environment.md.
The selected orchestrator runs the workbook preflight before POST. On the Ruby
profile its manual equivalent is ruby scripts/lib/preflight_lint.rb <spec.json>; the Python profile runs its equivalent in process and does not
shell out to Ruby. It rejects the two migration-killer bugs: a table with
aggregate columns + dimensions but no groupings (renders raw detail rows),
and a malformed control (missing id/controlId/controlType, wrongly
nested value fields, malformed source, or a list control wired to neither
source nor filters). Fix every violation first — never POST past it, and
never conclude a feature is "unsupported" from an Invalid kind error (it
means the inner fields are wrong). Verified shapes: sigma-workbooks
controls.md / tables.md.
Don't silently land the migrated data model + workbook in an auto-picked folder.
If the user didn't supply a destination (no --folder <id>), ASK before building:
ruby scripts/pick-destination.rb list or
python3 scripts/pick_destination.py list → { workspaces, folders (editable, with parentName), myDocuments }id lands content in the workspace root),
an existing folder, My Documents (when non-null — null for service tokens), or
create a new folder with the matching command:
ruby scripts/pick-destination.rb create ... or
python3 scripts/pick_destination.py create --name "<name>" [--parent <workspace-or-folder-id>]--folder <id>. folderId accepts a workspace id or a folder id.If a destination is already supplied, honor it silently — don't ask.
STATUS: VALIDATED end-to-end (2026-06-02; generalized + re-validated 2026-06-10). The full flow below was proven on a real migration ("Retail Orders (Qlik)" → Sigma) with exact parity to the Snowflake source at the data-model, denormalized-element, and workbook-chart layers — and the 2026-06-10 run produced the multi-page workbook (one Sigma page per Qlik sheet, layout straight from the sheet cell grids) from ONE command with zero hand-edits in under 2 minutes.
Resolve the Sigma warehouse connection a SINGLE time up front so no phase
free-searches /v2/connections (the token sink). Use the matching runtime:
ruby scripts/intake.rb --workdir <WORK> --tool qlik-to-sigma --mode live \
[--connection <id>] [--name <connection-name-substring>]
python3 scripts/intake.py --workdir <WORK> --tool qlik-to-sigma --mode live \
[--connection <id>] [--name <connection-name-substring>]
Caches <WORK>/connection.json (the orchestrator reads it when --connection is omitted —
point --out at the same <WORK>) and writes intake.json (run-start + mode for
run-duration / audit). Multiple connections + no id/name → it lists them and asks you to pick;
never guesses.
Point the selected orchestrator at the same <WORK>; it consumes
connection.json when --connection is omitted. Both intake implementations
write candidates and stop when multiple connections remain, so neither path
guesses. Use the matching destination picker before the build when --folder
was not supplied.
⛔ THE ONE PATH (do not improvise a workbook)
migrate-qlik.rbandmigrate-qlik.pyare the supported profile entrypoints. Run exactly the one recorded indoctor.json; each discovers the Qlik app, builds the DM + workbook, and in live mode only exits 0 when parity/layout/control pass with real elements built. Rules:
- NEVER hand-drive the per-phase scripts, hand-author a DM/workbook JSON, or
curl-POST to/v2/workbooks/ lay out empty "placeholder" pages. That bypasses parity + the element guard and ships an EMPTY workbook — the #1 way a migration fails. If you can't reach the Qlik app (noqlik-clicontext / auth), STOP and tell the user to authenticate (qlik context/ OAuth) — do not build a shell.- "Done" is evidenced accounting, not "pages exist." The orchestrator's
phase6-success.jsonis only a supporting sentinel; it is never sufficient by itself. Complete only after the selected profile'sassert-phase6-ran.rb|.pyexits 0, the complete app census has one terminal disposition per source object, andbuild-migration-report.rb|.pywrites a non-REDMIGRATION_REPORT.mdwhose--checkmode passes.verify-complete.rb|.pyremains an additional empty-build guard. An empty or incompletely accounted workbook is never done.- MCP and direct Snowflake credentials are optional. Given
--connection, the live path browsesGET /v2/connections/paths, resolves each source withPOST /v2/connection/<id>/lookup, and reads all columns through paginatedGET /v2/connections/tables/<inode>/columnsbefore the first write.
# Ruby profile:
ruby scripts/migrate-qlik.rb \
--app <qlikAppId> --connection <SIGMA_CONNECTION_ID> \
--database <DB> --schema <SCHEMA> --context <qlik-cli ctx> \
[--folder <SIGMA_FOLDER_ID>] [--name '<prefix>'] [--yes]
# Python profile (no Ruby; Node is still required):
python3 scripts/migrate-qlik.py \
--app <qlikAppId> --connection <SIGMA_CONNECTION_ID> \
--database <DB> --schema <SCHEMA> --context <qlik-cli ctx> \
--folder <SIGMA_FOLDER_ID> --out <WORK> [--name '<prefix>'] [--yes]
Offline corectl export: when a customer cannot grant live Qlik access, accept
the standard output of corectl unbuild and run the same pipeline:
python3 scripts/migrate-qlik.py \
--unbuild <app-unbuild-dir> --connection <SIGMA_CONNECTION_ID> \
--database <DB> --schema <SCHEMA> [--folder <SIGMA_FOLDER_ID>] [--yes]
The Ruby profile uses ruby scripts/migrate-qlik.rb with the same flags.
qlik-unbuild-discover.py recursively flattens sheet qChildren and normalizes
raw measures.json / dimensions.json; empty master-item arrays do not imply an
empty app. Inline chart hypercubes still become charts.json and workbook tiles.
discover → convert → data model → workbook → layout → parity, for ANY app, driven
entirely by the discovery artifacts (no app-specific edits). Exit 10 = genuine human
decisions printed as an OPEN QUESTIONS block (re-run with --yes or --answers);
exit 0 = PARITY GREEN; exit 3 = built but parity RED. Each phase below is also an
independently runnable script if you need to intervene mid-pipeline.
Offline smoke (no tenant/org/network/credentials):
SIGMA_OFFLINE_DRY_RUN=1 bash scripts/bootstrap.sh --runtime-profile python --workdir /tmp/smoke, then
SIGMA_OFFLINE_DRY_RUN=1 python3 scripts/migrate-qlik.py --from-discovery fixtures/retail-orders --connection 00000000-0000-0000-0000-000000000000 --database DEMO_DB --schema DEMO --dry-run --yes --out /tmp/smoke — see fixtures/README.md.
The Ruby profile remains supported with the same flags. The Python path never
invokes Ruby; it still requires Node for the vendored converter.
Read ALL of the following before replying or taking any action:
refs/operating-contract.md — READ FIRST: the fidelity guardrails (render + value-check EVERY page against the source; never ship empty or silently drop a tile; don't spin — surface blockers).refs/modeling-strategy.md — faithful reproduction is the DEFAULT (parity is the gate); an upstream OBT / Sigma-native materialization is an OPT-IN optimization for hot, join-heavy dashboards, re-verified against the same oracle. The converter never auto-flattens.refs/sigma-build-gotchas.md — the hard-won spec rules (SQL element, workbook master, YAML responses). This is the difference between a 2xx that errors at query time and a working migration.~/converter-source/CLAUDE.md — Sigma DM spec correctness rules + the verified DEMO_DB.DEMO test connection.plugins/sigma-authoring/skills/sigma-workbooks/SKILL.md in a full clone) + the Sigma OpenAPI — canonical workbook spec.Qlik's calc language (master measures/dimensions, Set Analysis) translates via
convertQlikToSigma — run locally by default (the vendored converter/qlik.mjs
bundle, in-process via a node shim, no clone/npm/network/MCP/data-egress); the
hosted mcp__sigma-data-model__convert_qlik_to_sigma tool is only a manual fallback
when no converter is available. But the decisive move is what you feed it: the
Qlik in-memory model (post-LOAD-script field names), NOT the raw warehouse tables.
The Qlik LOAD script's renames/drops are exactly what disambiguate a clean star; raw
warehouse column names collide (CITY/STATE/REGION/UNIT_COST shared across dims →
spurious relationships).
The Qlik LOAD script ≈ a Sigma custom-SQL element. Reproduce it as SQL and every Qlik field name resolves.
refs/connection.md)qlik-cli context (OAuth M2M or API key), or a standard corectl unbuild folder.
For live access: qlik context use <ctx>.
M2M reload limit: a plain M2M bot cannot reload an app that uses a space data-connection ("Connector not found"). Reload as a real user or via M2M impersonation. (Discovery/extraction works fine under M2M.)
CLIENT-MANAGED (on-prem) Qlik Sense? qlik-cli is Cloud-only. Use the bundled shim instead — same pipeline, different transport (QRS + Engine WebSocket): set up auth per
refs/connection-onprem.md(certs or JWT virtual proxy), thenexport QLIK_BIN="$PWD/scripts/qlik-onprem-shim.py"before Phase 1. Everything else below is unchanged. QlikView (.qvw) is a DIFFERENT product (no Cloud/REST API) — migrate it from its-prjproject folder via--prj(data model + workbook; see the QlikView note in Phase 5/6 below); confirm which product you have first.
export SIGMA_BASE_URL='https://<your-published-sigma-api-host>'
eval "$(scripts/vendor/browser-login.sh)" # preferred one-time interactive login
Both supported orchestrators and their Python builders use the co-located
sigma_rest client: a valid caller token is reused, a stored browser session is
refreshed before client credentials are tried, known-age tokens refresh
proactively, and HTTP 401 is refreshed/retried exactly once. For unattended
hosts, configure SIGMA_CLIENT_ID / SIGMA_CLIENT_SECRET instead. Manual
get-token.sh / get_token.py output is only needed for raw shell/curl calls.
Need a Sigma connection pointing at the same warehouse as the Qlik app (for parity).
The scripts discover tables and columns through that connection's Sigma REST
catalog; a Snowflake login/CLI/MCP is not a prerequisite.
The verified DEMO_DB.DEMO connection is ab12cd34-5678-40ab-8def-1234567890ab (Snowflake gxb98765).
QLIK_BIN)scripts/qlik-discover.py --app <id> --context <ctx> --out WORK extracts:
qlik app script get); it encodes renames/joins/drops. Capture the effective table→field map (post-rename).qMeasure.qDef (Qlik expressions) + label. (List via the engine; for known ids qlik app object get <id>.)charts.json) — per object: vizType, title, owning sheet, dims (raw field defs + labels + qNullSuppression), measures (exprs + labels + Qlik number formats), sort definition.layout.json) — per sheet: columns×rows grid + every object's col/row/colspan/rowspan. The workbook step maps this 1:1 onto Sigma's 24-col grid (row-scale ≥2 so labels render; KPIs bumped to ≥5 rows).app-meta.json + snapshot.json) — lastReloadTime, Section Access / DirectQuery flags, plus a Qlik-engine eval snapshot of every sheet KPI and Max(date) — read-only, no reload.
Assemble into the converter's input JSON (refs/example-converter-input.json):
{appName, tables:[{name, noOfRows, fields:[{name}]}], masterMeasures:[{title,qDef}], masterDimensions:[]}.
Use the post-rename Qlik field names so relationships come out clean.Complete app census (mandatory). Discovery scope is not just the objects the
builder happened to emit. Run build-qlik-accounting.py --workdir <WORK> to
produce <WORK>/source-object-census.json for every
in-scope app, sheet, chart/object (including recursive inline children), master
measure, master/calculated dimension, filterpane/listbox, alternate state,
Section Access finding, and expression/function finding. Each record must finish
as migrated, approximated, needs-review, skipped, or not-applicable
with evidence. Missing, duplicate, or contradictory dispositions block
completion. See refs/migration-report-format.md; durable capability gaps live
in refs/open-items.md, not in the run census.
For a corectl export, --unbuild runs qlik-unbuild-discover.py first. A sheet
is a full property tree, so every qChildren level is flattened recursively and
assigned back to its owning sheet before the normal Phase 2-6 pipeline starts.
Discovery is fully parallel and strictly read-only (re-engineered 2026-06-11):
--pool, default 8) bounded by a
single global semaphore — the per-object properties loop was the serial
bottleneck (46 × ~1.2s). Measured on the 46-object fixture app:
57.3s serial → 12.5s full / 8.4s with --defer-snapshot (≈4.6×). Per-app
cost scales with pool width, not object count — a 40-app estate's discovery
drops from ~38 min to ~6 min of source-side wall clock.qlik app measure/dimension ls + per-item properties. The old temp
MeasureList/DimensionList object briefly SAVED the app — bumping
modifiedDate on every discovery (verified live: old run bumps it, three
new-mode runs leave it untouched). Discovery never reloads, never writes.snapshot.json) are
consumed only at the Phase-6 freshness banner, and in-memory totals can't
change without a reload — so the selected orchestrator runs discovery with
--defer-snapshot and computes the snapshot via --snapshot-only as a
background lane under Phases 2-5.timings.json (and
timings-snapshot.json) record per-stage wall-clock + retry counts on every
run.Before ANY side-by-side, compare the app's lastReloadTime + in-memory snapshot
against the live warehouse. Qlik shows a reload-time snapshot; Sigma queries the
warehouse live — a stale app makes every total differ and looks like a conversion
bug if you don't lead with it. The orchestrator prints the staleness up front
("Qlik app last reloaded N days ago") and Phase 6 leads its handoff with the explicit
comparison, e.g. "Qlik is ~8 days stale; Sigma will show more data (Qlik 106,723.34 /
620 orders vs warehouse 110,342.75 / 648)" — classifying each KPI delta as
MATCH / STALE-EXPLAINED / DIVERGENT. Offer the user the option to reload/repoint the
Qlik app first if they need matching snapshots. Only DIVERGENT (delta NOT explained by
staleness) blocks GREEN.
Legacy QlikView
.qvw? QlikView is a DIFFERENT product from Qlik Sense — no Cloud/REST API and no.qvwparser. Migrate it from the developer-opt-in-prjproject folder: have the customer enable "Create project folder" in QlikView Desktop and send the whole<name>-prj/folder, then run the SAME command as any migration:python3 scripts/migrate-qlik.py --prj <path/to/Name-prj> --connection <SIGMA_CONNECTION_ID> \ [--database DB --schema SCHEMA --folder <SIGMA_FOLDER_ID> --name '<prefix>']The Ruby profile uses
ruby scripts/migrate-qlik.rbwith the same flags. A--prjfolder is auto-detected:scripts/qlik-prj-discover.pyparses it into the SAME discovery artifacts the Qlik Sense pipeline consumes, so the full pipeline runs unchanged — data model AND workbook. It reads:
LoadScript.txt→ tables/fields (incl.ASrenames; alib://…/T.qvdload resolves to warehouse tableT) → the Sigma data model.QlikViewProject.xml→ sheets + each object's<Rect>→ the Sigma page layout (24-col grid).CH*.xml→<GraphMode>(chart kind → Sigma viz),<Dimensions>, and<Expressions>(measures, same Set Analysis / Range / Dual / Class translation) → the workbook charts.Scope / caveats (be honest with customers): a
-prjfolder has no live engine, so without a live engine the default check is warehouse executability only (nonempty/error-free exports, explicitly non-strict and RED for completion). Supply--warehouse-expected <json>from independently queried warehouse results (object keyed by source object id, each value an ordered row array) to arm strict value parity, and chart-kind/layout fidelity is best-effort (there is no QlikView renderer to diff against). Because QlikView has no capture API, the--prjdiscovery step (qlik-prj-discover.py) prints an[ASSIST]telling you toAskUserQuestionfor a screenshot of each sheet and drop them in<workdir>/dashboards/<sheetId>.png— that arms the source-side gates (Phase-1d source-anchors, visual-compare, visual-similarity). If the user has none, those gates are WAIVED with a stated reason at Phase 6 (never a silent skip). Relationships are inferred from shared field names only (a-prjfolder carries no row counts) → review join directions in Sigma. All 13 QlikView chart types are mapped (bar/line/combo/pie/scatter/straight-table/pivot-table exactly; gauge→KPI, and radar/grid/block/funnel/mekko→closest Sigma kind, each flagged as an approximation in the warnings since Sigma has no exact equivalent). An unrecognizedGraphModevariant falls back to a bar chart with a loud warning — never a silent wrong default.
Local by default, zero-config, no MCP. The selected orchestrator runs
convertQlikToSigma in-process via a node shim against the self-contained bundle
VENDORED in the skill (converter/qlik.mjs) — no clone, no npm, no network, no
MCP, no data egress. A dev's own build wins via QLIK_MCP_DIR (or a local
converter-source checkout); refresh the bundle with tools/vendor-converters.sh.
Only if the vendored bundle is also missing (and QLIK_MCP_DIR unset) does
the orchestrator abort, at which point run the mcp__sigma-data-model__convert_qlik_to_sigma
MCP tool manually (same model_json → Sigma DM spec contract) and feed its output
back in as converter-out.json. The hosted MCP is a fallback, not the default path.
Output = Sigma DM spec (warehouse-table elements + relationships on shared keys +
metrics from measures + auto "Dim View" denormalized elements).
Scalar-function catalog and formula mapping (mandatory pre-POST evidence).
refs/catalogs/scalar-function.json is the durable, source-cited catalog (also
rendered into refs/qlik-coverage.md); the examples below are not a complete
function surface. An exact row covers only its documented token-level shape,
while needs-review is fail-closed rather than passthrough. For every expression
run normalize-qlik-expressions.py against converter-input.json and the raw
converter output; build from its patched output, and retain its
<WORK>/formula-mapping.json with each encountered
function, evaluation context (LOAD script, chart row, aggregation, or selection
state), source expression, emitted Sigma formula or explicit manual/skip
disposition, dependency/grain, and validation evidence. Overloaded scalar
semantics, Aggr(), selection-state expressions, and complex Set Analysis remain
unresolved until this run's mapping proves them; do not infer support from token
recognition. See refs/open-items.md.
Expression coverage (validated against live Sigma 2026-06-05): the converter now auto-translates the common Qlik idioms instead of dropping them:
Sum({<F={v}>} X) → Sum(If([F]=v, [X])); {1} (ignore
selections) → plain agg; {<F-={v}>} → <>; multi-value {a,b} → or-chain;
multi-flag → and-chain; Count({<…>} DISTINCT X) → CountDistinct(If(…, [X])).RangeSum→a + b, RangeMax→Greatest, RangeMin→Least, RangeAvg→(a+b)/n.Floor([x]/n)*n; Count(DISTINCT x) → CountDistinct(x).Still dropped (warned, not silently emitted): $(var) dollar-expansion (would
POST-block the whole DM), inter-record Above/Below/Peek/Previous/RowNo, ranking
Rank/HRank, set-element P()/E(), Aggr(), FirstSortedValue, exotic set modifiers
(search/$()/set operators). These → run the gap-scout (scripts/gap-scout.md).
Cross-element caveat: a translated measure whose condition field lives on a dim
(e.g. Sum(If([Is Holiday]=1, [Net Revenue]))) is placed on the fact element and the
converter emits an ℹ … references fields from N elements warning — host that metric on
the denormalized element (which carries all fields) or it errors as cross-element.
Before building a NEW data model in Phase 3, check whether an existing Sigma DM already covers the same warehouse tables (don't add a 4th near-identical "Orders" DM):
python3 scripts/qlik-dm-signature.py --model converter-input.json \
--database <DB> --schema <SCHEMA> --out $WORK/dm-signature.json
ruby scripts/vendor/find-or-pick-dm.rb --workbook-signature $WORK/dm-signature.json \
--out $WORK/dm-match.json --auto-pick # exit 0 = candidate ≥ min-score
Those are Ruby-profile/manual recovery commands. The Python orchestrator runs
the same strict reuse decision in process; do not install Ruby to hand-drive
this phase on the Python profile.
qlik-dm-signature.py derives {warehouse_tables, referenced_columns, measures} from the
Phase-1 converter input (pass the same --database/--schema you hand the converter —
Qlik table names are bare). Decision:
dm-match.json. If they reuse, run a
shape preflight first — read the candidate DM's spec back and confirm every column
the workbook needs resolves on the element you'll wire to (no error types, fact vs dim
location) — then skip Phase 3 and point Phase 4's masters at the matched
recommended_dm_id + its element ids. With --auto-pick a clear winner (no tie within
0.05) skips the prompt — still WARN about inherited columns/RLS/metrics.scripts/build-sigma-dm.py)Artifact-driven (NO baked-in table maps or SQL): consumes converter-out.json +
reconcile.json (from reconcile-columns.py) + denorm.json (from
gen-denorm-sql.py):
OrderFact→ORDER_FACT), column formulas
[REAL_TABLE/<real col display>] with the Qlik field name kept as the display name.
Relationships are by column-id, so they survive the repoint. Physical columns
stay on these star elements; supported row-wise LOAD expressions (If, Match,
string/date helpers, arithmetic) compile to SQL and remain on the denormalized
element. Unsupported LOAD functions fail before POST instead of disappearing.refs/sigma-build-gotchas.md.DAYS_TO_SHIP → "Days to Ship", NOT "Days To Ship" — verified against a live DM
readback 2026-06-10), so refs line up with Sigma-derived names with no defensive
describes./v2/dataModels/spec body {folderId, schemaVersion:1, ...spec}; element ids
are reassigned on save — the script reads back the persisted denorm element id.preflight-warehouse.rb validates every source table and every
physical/expression-input column through the supplied Sigma connection's REST
catalog. It canonicalizes path/column case and rejects missing or ambiguous tables.scripts/build-sigma-workbook.py)Artifact-driven: consumes charts.json + layout.json + denorm.json + the DM ids.
Builds a hidden "Data" page master table (every denorm column) sourced from the
denorm DM element, then one Sigma page per Qlik sheet with KPI/bar/line/pie/
combo/table elements translated from each object's hypercube (kinds, labels, number
formats, sorts, null-suppression — see the script docstring for the full mapping).
The Qlik cell grid maps 1:1 onto the 24-col Sigma grid. Element shapes + the
source.dataModelId requirement in refs/sigma-build-gotchas.md.
POST /v2/workbooks — contents-wrapped, not flat (live-verified 2026-11-03; the
/v2/workbooks/spec endpoints are deprecated): schemaVersion/pages/kind/layout
nest under a top-level contents key, folderId stays outside it; dry-run with
dryRun: true, read back with GET /v2/workbooks/{id}?includeContents=true, replace
with PUT /v2/workbooks/{id}/contents. The DM POST above is unaffected (/v2/dataModels/spec
is not deprecated) and stays flat — then scripts/vendor/put-layout.rb applies the layout XML
(contents.layout).
Pre-write source-coverage gate. The orchestrator dry-compiles the data model
and workbook before either POST, runs preflight_lint.rb, and writes
workbook-coverage.json. Every authored queryable source visual must map to a
queryable Sigma element. Zero-queryable/Data-only workbooks and partially dropped
visual sets fail in live and --dry-run modes before any object is created.
DM metric references (leverage the semantic layer, don't duplicate it). A measure
column prefers a governed [Metrics/<name>] reference over re-deriving the aggregation
inline, when the measure's translated inline aggregate matches a metric hosted on the denorm
element the master sources. Match is by FORMULA equivalence — strip the master prefix so
Sum([Master/Net Revenue]) equals a metric's Sum([Net Revenue]) — so it's naming-independent
and SAFE: ratios with no exact-metric match, measures in a different representation (e.g. the
inline CountDistinct(...) vs a Qlik-form Count(DISTINCT ...) metric), and any non-match all
fall back to inline. The selected orchestrator hands the freshly-built DM spec to the builder via
--dm-spec; the shared binder (scripts/lib/metric_binding.py, resolving own + inherited
metrics through the source.elementId chain) does the matching. No --dm-spec / the DM-reuse
path → inline, byte-identical to before. Verified: tests/test_metric_reference.py.
Filterpanes/listboxes → controls (NOT skipped). Each filterpane child
listbox (discovered via qChildList + per-listbox layout) and standalone
listbox becomes a Sigma list control — or a date-range control when the
field is date-typed ($date/$timestamp qTags; a list control bound to a
datetime column gets its filter targets SILENTLY STRIPPED by Sigma). Scope is
GLOBAL, matching Qlik's associative model: one filter target on the master
table propagates to every chart on every page. A second listbox on the same
field dedupes to the one global control; alternate-state listboxes are flagged
MANUAL. The builder emits the control-scope.json sidecar (contract:
scripts/lib/control_lint.rb header + refs/control-parity.md) with
sourceFilterSignals, per-control mustReach over every chart on every page
(static proof of global reach), and unbound entries with reasons.
Synthesized cross-filter controls (--synth-controls). Qlik cross-filters on
any field via the global associative model — including sheets with no
filterpane, where a user just clicks a bar. Sigma has no authorable chart-mark
"Use as filter" (UI-only), so build-sigma-workbook.py recreates that UX with
controls: when the source app has zero filter widgets (e.g. QlikView -prj,
which carries none, or a filterpane-less Sense sheet), it synthesizes a compact
control bar from the most-used chart dimension fields (deduped, *_KEY/*_ID
and expression dims excluded, capped by --synth-controls-max, default 6), each
filtering the shared master via the same build_control() shapes + control_lint
reach enforcement. Modes: auto (default — synth only when there are no real filter
widgets, so apps that already have filterpanes are unchanged/golden-safe), all
(also top up apps that have some filters), off (strict port — real widgets only).
Synth controls are tagged synthesized:true in the sidecar (synthesizedCount),
and are not counted as sourceFilterSignals. Post-publish note: true
in-chart mark-click cross-filtering is a one-time Sigma UI step ("Use as filter"),
not spec-authorable — call it out to the customer.
Native trellis (small multiples). A Qlik chart-level trellis (a chart
whose Appearance>Trellis splits it into a panel grid by a dimension) and the
native trellis-container object both collapse to Sigma's native element
trellis — ONE viz element + rowsBy/columnsBy faceting, NOT N cloned
charts. Discovery records the neutral signal chart["trellis"] = {field, orientation, secondary?, label?}; build-sigma-workbook.py's emit_trellis
adds the facet dimension as a column and calls the shared TrellisEmit
(scripts/lib/trellis_emit.py, a byte-identical mirror of the Ruby
shared/lib/trellis_emit.rb) — the single source of truth for the supported
kinds (bar/line/area/combo/scatter/donut) and the fallbacks (pie→donut,
kpi→N sibling KPIs, pivot→own shelves, table→flat). Sigma silently strips
an unsupported trellis on readback, so the build writes the neutral
native-trellis-emitted.json sidecar and the round-trip is asserted by
verify-trellis-survived.rb (converter-neutral) against the readback spec. A
non-trellis app is byte-identical (no signal → no-op → no sidecar). See
docs/sigma-trellis-chart-support.md + docs/trellis-cross-converter-plan.md.
Three checks, led by the freshness banner (Phase 1.5 — read it before any side-by-side):
GET /v2/workbooks/{id}/columns: zero error-typed columns.qlik app eval); deltas classified MATCH / STALE-EXPLAINED / DIVERGENT.Count(distinct dim…)), so a suppressed/extra null bucket or a
dim-value-without-facts surfaces even when every shared cell matches.
(Known shape: Qlik shows dimension values with zero fact rows — e.g. a store with
no orders — that a fact-grain LEFT JOIN can never emit; that's data shape, not a bug.)scripts/lib/layout_lint.rb (shared, vendored
byte-identical) runs against the LIVE spec readback: no raw-id element display
names, no controls orphaned outside containers on a banded page, no generic
Sigma auto-page title in the header band. RED here blocks GREEN. Bypass with
--skip-layout-lint. (Verified clean against shipped Qlik migrations.)scripts/lib/control_lint.rb (shared, vendored
byte-identical) runs against the LIVE spec readback + the builder's
control-scope.json sidecar: no dead controls, no ghost targets, full reach
(incl. the Qlik mustReach global-scope assertions), and source-signal
coverage (filterpanes/listboxes in the app but zero controls = RED).
Optional runtime proof: ruby scripts/probe-controls.rb --workbook-id <wb>
(flip test via export parameters; MCP can NOT set a control value).
GREEN = all columns resolve + no DIVERGENT KPI + layout lint clean + control lint clean. Bucket
mismatches WARN loudly with the likely cause. (First run matched to the cent;
staleness-explained deltas don't block.)Querying for parity:
metric('<id>', t)against a data-model element can return "Missing Metric" — aggregate the element's raw columns directly instead (SUM("<colId>")/COUNT(DISTINCT ...)), or use the REST export API. Seerefs/sigma-build-gotchas.md→ Metrics.
A workbook that POSTs 200 and passes numeric/bucket parity can still be visually broken — overlapping tiles, clipped KPI titles, dead zones, filters floating over charts. Qlik's associative model floats listboxes/filterpanes on top of charts and Sigma's grid has no z-order; the build script now lifts controls to a top band and de-overlaps (_decollide_bands), but novel sheets can still slip through.
When the customer supplies full-sheet screenshots, they are BUILD INPUTS, not just final evidence:
--source-sheet-png <sheetId>=<image> (repeat per sheet),
or place it under <WORK>/source-pages/<sheetId>.png.<WORK>/design-manifest.json and exits 10 before any
Sigma write. An image-capable agent MUST read every sourceImage, inventory
every tile in Sigma terms, set the tile kind, title, orientation, legend,
and grid, mark every page/tile reviewed:true, and set status:"approved".--design-manifest <WORK>/design-manifest.json. The preflight and
live workbook builds consume those approved overrides.design-iteration-request.json. Read each source/target pair, revise the
manifest, increment iteration, and rerun with both
--workbook-id <existing-id> and --design-manifest ...; this PUTs the
existing workbook and rerenders it instead of creating duplicates.The manifest never invents formulas or fields: source expressions and parity
still come from Qlik metadata. It controls visual interpretation and composition.
Schema and review contract: refs/screenshot-design-manifest.md.
<workdir>/visual-qa/<pageId>.png) so the gate runs by default. To re-render a page manually after minting a token with the selected profile:
python3 scripts/sigma-export-png.py --workbook <id> --page <pageId> --out /tmp/<page>.png --w 1600python3 scripts/png_health.py <image.png> --json-out <WORK>/render-health/<name>.json.
This is only a decode/ink health check, not visual parity.refs/layout-visual-qa.md: every source tile must be present, non-blank, in
the right chart family, and visually checked; full-page health cannot hide a
blank or wrong tile. When normalized percentage tile bounds are available,
also run visual-similarity.py --tiles <bounds.json> and retain its per-tile
evidence. Record the source-vs-target verdict with the selected profile's
record-visual-check.rb or record_visual_check.py; a missing source image
is a named waiver, not PASS.--workbook-id; for non-manifest repairs use the companion
sigma-workbooks skill's scripts/wb-rep.rb (full-clone:
plugins/sigma-authoring/skills/sigma-workbooks/scripts/wb-rep.rb; pull →
edit element files → push) — then re-render and re-read.After parity and visual QA, the selected orchestrator must run the shared completion contract and final accounting. These are the Ruby profile's manual recovery commands:
python3 scripts/finalize-qlik-report.py --workdir <WORK> [--source-png <sheet.png>]
ruby scripts/assert-phase6-ran.rb --workdir <WORK> --workbook-id <workbookId>
ruby scripts/build-migration-report.rb --workdir <WORK> --check
ruby scripts/verify-complete.rb --workdir <WORK> --workbook-id <workbookId>
Python profile recovery commands:
python3 scripts/finalize-qlik-report.py --workdir <WORK> [--source-png <sheet.png>]
python3 scripts/assert-phase6-ran.py --workdir <WORK> --workbook-id <workbookId>
python3 scripts/build-migration-report.py --workdir <WORK> --check
python3 scripts/verify-complete.py --workdir <WORK> --workbook-id <workbookId>
All four commands must exit 0. The finalizer refreshes PNG health, visual
similarity, full-app accounting, the degradation ledger, MIGRATION_REPORT.md,
and migration-result.json. assert-phase6-ran.rb is the shared,
converter-neutral gate over parity-final.json, live readback, layout/control,
render, visual, tile, and waiver evidence. The inline
phase6-success.json marker does not replace either the shared gate or the
complete census/report.
On the no-Ruby Python profile, rerun python3 scripts/migrate-qlik.py with the
same workdir; it executes the equivalent Python completion checks. A Python
run must never install or invoke Ruby to manufacture completion evidence.
| Script | Phase | Purpose |
|---|---|---|
scripts/qlik-discover.py | 1 | Extract data model (load script), master measures/dimensions (read-only measure/dimension ls + properties), and sheets/charts from any app → converter-input.json. Pooled (--pool 8), strictly read-only, --defer-snapshot/--snapshot-only lanes, timings.json evidence. Validated (57.3s → 12.5s on the 46-object fixture app). |
scripts/qlik-unbuild-discover.py | 1 | Normalize a corectl unbuild folder into the live discovery contract; recursively flattens sheet qChildren, including inline charts when master measure/dimension arrays are empty. Offline and creds-free. |
scripts/qlik-dm-signature.py | 2.5 | Converter-input JSON → DM-reuse signature ({warehouse_tables, referenced_columns, measures}) for the selected profile's DM picker. Validated live. |
scripts/vendor/find-or-pick-dm.rb | 2.5 | Scan existing Sigma DMs and recommend reuse (score = 0.7·column + 0.2·table + 0.1·metric overlap; --auto-pick with tie-window safety). Shared vendor-neutral copy (canonical: tableau-to-sigma). Non-destructive. |
scripts/migrate-qlik.rb | ALL | The one command — chains every phase below for any app/sheet; OPEN-QUESTIONS checkpoint, freshness preflight, bucket parity; --from-discovery + --dry-run = offline smoke. Discovery runs as a background lane with Sigma-side prep (token, folder, DM-spec prefetch for Phase 2.5) interleaved in the foreground; the engine snapshot runs as its own lane under Phases 2-5; PHASE TIMINGS printed at exit. Validated live 2026-06-11 (68s wall, zero hand-edits, GREEN incl. layout lint). |
scripts/migrate-qlik.py | ALL | Supported Python + Node entrypoint for the same artifact-driven, fail-closed pipeline. Requires no Ruby; SIGMA_OFFLINE_DRY_RUN=1 plus --from-discovery ... --dry-run --yes is the credentials-free certification path. |
scripts/reconcile-columns.py | 3 | Auto-derive the Qlik-field → real-warehouse-column map from the load script's AS aliases + FROM tables (so the DM points at real columns). Validated. |
scripts/preflight-warehouse.rb | 3 | Resolve tables and exhaustively list columns through the supplied Sigma connection's REST catalog; no MCP or direct warehouse credentials. Blocks missing/ambiguous sources before POST. |
scripts/gen-denorm-sql.py | 3 | Turn reconcile.json into the denormalized SQL element (real AS qlik + inferred fact↔dim joins) — feeds build-sigma-dm.py. Display names match Sigma's own derivation rule. Validated. |
scripts/batch-migrate.py | 3–6 | Migrate many apps in one pass (one Sigma workbook each, reusing a SHARED DM) — for tenant-scale demos. For distinct apps, run the selected migrate-qlik entrypoint per app. Validated on 5 apps. |
scripts/gap-scout.md | 2 | Sub-agent guide: for each unhandled Qlik expression (Aggr/Dual/selection-state/Range*/Class), spawn a scout to find + validate a Sigma translation and persist it. |
scripts/scout-validate.py | 2 | Gap-scout primitive: validate a candidate formula via a throwaway test workbook (column-type check) + persist to ~/.qlik-to-sigma/learned-rules.yaml. Validated. |
scripts/learned-rules.py | 2 | Loader: the build step applies customer-accumulated rules before falling back to a WARN. |
scripts/normalize-qlik-expressions.py | 2 | Apply only catalog-grounded scalar rewrites to raw converter output, remove unsafe/unknown callable artifacts fail-closed, and write the patched converter output plus formula-mapping.json. |
scripts/qlik-screenshot.py | 1/6 | Export PNGs of a sheet's charts (or specific viz ids) via the Qlik reporting API, for before/after capture. Validated (per-viz PNG; whole-sheet is PDF only). |
scripts/qlik_design_manifest.py | 1/5.5 | Seed/validate the screenshot design manifest. The image-capable agent approves per-tile kind/title/orientation/legend/grid before build; failed renders produce an iteration request and update the existing workbook in place. |
scripts/sigma-export-png.py | 5.5 | Render a workbook page/element to PNG via the export API for visual inspection against refs/layout-visual-qa.md (the Visual QA gate). |
scripts/png_health.py | 5.5 | Deterministic PNG decode/ink health check; rejects solid, all-white, or effectively blank exports and can write run-local render-health JSON. It does not judge source fidelity. |
scripts/visual-similarity.py | 5.5 | Deterministic source-vs-Sigma structural floor; optional normalized tile bounds add per-tile blank detection. Exit 2 is an error, never PASS. |
scripts/record-visual-check.rb / scripts/record_visual_check.py | 5.5 | Record the image-capable source-vs-target verdict and checklist in parity-final.json for the hard gate; missing source imagery requires a named waiver. |
scripts/build-sigma-dm.py | 3 | Author + POST the Sigma data model FROM THE PIPELINE ARTIFACTS (converter-out + reconcile + denorm): repointed star + relationships + denorm SQL element + metrics. --dry-run for offline. Proven (generalized 2026-06-10). |
scripts/build-sigma-workbook.py | 4 | Author + POST the workbook FROM DISCOVERY (charts.json + layout.json): one page per Qlik sheet, cell-grid layout, sorts, formats, null-suppression filters. --dry-run for offline. Proven (generalized 2026-06-10). |
scripts/lib/layout_lint.rb | 5 | Shared layout-quality lint (gate 6) — raw-id display names / orphan controls outside containers / generic header-band title; run automatically by the selected orchestrator (--skip-layout-lint to bypass). |
scripts/lib/control_lint.rb | 5 | Shared control-wiring lint (gate 7) — dead controls / ghost targets / reach / control-scope.json coverage; run automatically by the selected orchestrator. |
scripts/probe-controls.rb | 5 | Shared flip test — runtime proof a control filters: export an in-closure element with/without parameters:{controlId: value}; cross-page exports prove Qlik's global scope. |
scripts/assert-phase6-ran.rb | 6 | Shared hard completion gate over parity, live readback, layout/control, render/visual/tile evidence, and waivers. Must exit 0 before declaring completion. |
scripts/build-qlik-accounting.py | 6 | Reconcile the complete Qlik app inventory, formula mapping, DM/workbook outputs, controls, layout, tiles, and parity into source-object-census.json, coverage.json, and Qlik control/layout evidence; fails closed on unaccounted objects. |
scripts/finalize-qlik-report.py | 6 | Read-only completion finalizer: refresh Qlik accounting, source/target PNG health, visual similarity, degradation evidence, MIGRATION_REPORT.md, and migration-result.json; attempts every producer and exits nonzero if any contract fails. |
scripts/build-migration-report.rb | 6 | Consume the complete source-object census and gate artifacts; write MIGRATION_REPORT.md + migration-result.json. --check rejects stale or inconsistent output. |
scripts/verify-complete.rb | 6 | Additional Qlik empty-build/workbook-id sentinel check. It is supporting evidence and does not replace assert-phase6-ran.rb or the migration report. |
refs/control-parity.md | 5 | The control-parity contract: lint + sidecar schema + the MCP/export-API answer (export parameters is the only way to set a control value). |
refs/example-converter-input.json | 1–2 | The exact convert_qlik_to_sigma input from the first migration. |
fixtures/retail-orders/ | — | Complete offline discovery+converter input set (sanitized demo app) — see fixtures/README.md for the offline smoke path. |
fixtures/corectl-country-unbuild/ | - | Synthetic corectl full-property-tree export: empty master arrays, nested COUNTRY charts, and an If(Match(...)) calculated LOAD field. |
qlik-discover.py --app <id> enumerates master items via the read-only
qlik app measure ls / qlik app dimension ls + per-item properties
(qlik-cli's object ls does NOT list master items; the old temp
MeasureList/DimensionList object create→rm briefly SAVED the app, bumping its
modifiedDate on every discovery — eliminated 2026-06-11). Everything
(incl. qlik app eval for the freshness snapshot) is read-only; the app is
never reloaded and never written.
Sum(If(...)) — auto-translated in the converter + validated live (2026-06-05). Host dim-flag measures on the denorm element.$(var)/Above/Rank/P()/Aggr — drop+warn (no longer emitted verbatim; previously $() POST-blocked the whole DM).elements[0].scripts/reconcile-columns.py auto-derives it from the load-script AS aliases.scripts/qlik-screenshot.py (Qlik reporting API).scout-validate.py kpi-chart bug fixed (value.columnId, was value.id → every kpi validation failed POST).migrate-qlik.rb / migrate-qlik.py) — discover→convert→DM→workbook→layout→parity, artifact-driven builders.qlik-assessment skill — built (sibling dir).[bead], relationship half); denorm "View" column bloat/dupes on multi-fact ([bead]; the DM build now ships the denorm SQL element INSTEAD of the converter "View" elements); full multi-fact END-TO-END parity needs a real 2nd Snowflake fact + Qlik app (task). Aggr() guidance ([bead]).Row/column security is never silently dropped and never silently ported — and it is handled by the skill, not baked into the converted model. The converter (convert_qlik_to_sigma) only detects and reports security in result.security[]; it does not inject it into the data-model spec (a stateless converter can't create Sigma user attributes or assign members, so an injected CurrentUserAttributeText filter would fail-closed to 0 rows). This skill provisions + applies it after the model is posted.
What is detected for Qlik: Section Access (supply the parsed sectionAccess object): REDUCTION row reduction (to team/attribute RLS; strict-exclusion equals Sigma fail-closed) and OMIT column reduction (to CLS).
When Qlik metadata/load-script discovery detects Section Access but cannot
materialize its rules (for example, connection-backed access tables), provide
the reviewed rule artifact with migrate-qlik.py --security <security.json>.
The Python path aborts by default when only the boolean/script signal exists;
it never treats missing rules as an unsecured success.
Flow (only runs when result.security is non-empty — zero overhead otherwise):
dataModelId and the converter's result.security[] (write it to security.json).python3 scripts/apply_sigma_rls.py --from-security security.json --dm-id <dataModelId> --workdir <WORK> # plan only (default)
python3 scripts/apply_sigma_rls.py --from-security security.json --dm-id <dataModelId> --workdir <WORK> --provision --apply \
[--membership-evidence <assignment-readback.json>]
The RLS helper uses the same browser-first provider and one-401 retry
contract; no manual token mint is required.
--provision creates missing user attributes / teams; --apply PATCHes the boolean RLS calc column + fail-closed filters entry and the columnSecurities (CLS) onto the matching element, reads every requested rule back, and writes run/model/hash-bound security-decision.json. When rules name teams or user attributes, completion also requires hash-bound --membership-evidence from the assignment/readback step.security-effective-user-verdict.json
bound to the run, data model, DM readback hash, source/Sigma roster evidence,
and at least one passing allow + deny test. Each test must cover the exact
source-policy rule ids and carry distinct, hash-bound Qlik/Sigma result
payloads with matching principal/query/rows plus transport provenance.
Automatic Qlik OMIT output is
not equivalent to per-user CLS: customize it and set
verifiedEquivalent:true only after these tests.For a detected Section Access app, unattended Python runs default to abort
before build. An explicit proceed may post the model for security work, but
the Python completion gate remains RED until security-decision.json records
either an applied/readback-verified port or customize decision, or a named
skip with acknowledges_all_rows_visible:true (budget-counted waiver).
Skip is loud: opting out leaves the migrated model with NO RLS — all rows visible to everyone. Confirm before skipping.
PYTHON_RUNTIME.md (opens in a new tab)QUICKSTART.md (opens in a new tab)converter/PROVENANCE.json (opens in a new tab)converter/qlik.mjs (opens in a new tab)fixtures/README.md (opens in a new tab)fixtures/corectl-country-unbuild/app-properties.json (opens in a new tab)fixtures/corectl-country-unbuild/connections.yml (opens in a new tab)fixtures/corectl-country-unbuild/corectl.yml (opens in a new tab)fixtures/corectl-country-unbuild/dimensions.json (opens in a new tab)fixtures/corectl-country-unbuild/measures.json (opens in a new tab)fixtures/corectl-country-unbuild/objects/sheet-country-overview.json (opens in a new tab)fixtures/corectl-country-unbuild/script.qvs (opens in a new tab)fixtures/map-layers/map-layout.json (opens in a new tab)fixtures/map-layers/map-properties.json (opens in a new tab)fixtures/qlikview-retail-prj/CH01.xml (opens in a new tab)fixtures/qlikview-retail-prj/CH02.xml (opens in a new tab)fixtures/qlikview-retail-prj/CH03.xml (opens in a new tab)fixtures/qlikview-retail-prj/CH04.xml (opens in a new tab)fixtures/qlikview-retail-prj/LoadScript.txt (opens in a new tab)fixtures/qlikview-retail-prj/QlikViewProject.xml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub sigmacomputing/sigma-migration-skills --plugin qlik-to-sigma