[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-explore-omni-omni-query":3,"mdc--v9lchl-key":40,"related-org-explore-omni-omni-query":7800,"related-repo-explore-omni-omni-query":7945},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":29,"repoUrl":30,"updatedAt":31,"license":32,"forks":33,"topics":34,"repo":35,"sourceUrl":38,"mdContent":39},"omni-query","query Omni Analytics semantic layer","Run queries against Omni Analytics' semantic layer using the Omni CLI, interpret results, and chain queries for multi-step analysis. Use this skill whenever someone wants to query data through Omni, run a report, get metrics, pull numbers, analyze data, ask \"how many\" \u002F \"what's the trend\" \u002F \"show me the data\", retrieve dashboard query results, or extract data from an existing dashboard or workbook. Also use for table calculations and computed columns (running totals, percent-of-total, month-over-month \u002F period-over-period change, moving averages, rankings), open-ended multi-step analysis via agentic AI jobs, and running raw SQL through the semantic layer — even when the user doesn't say \"query\" (e.g. \"add a running total column\", \"what's our MoM growth\", \"analyze revenue trends\"). For building or editing a dashboard or chart use omni-content-builder; for adding a field or measure to the model use omni-model-builder — this skill retrieves and computes over data.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"explore-omni","Explore Omni","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fexplore-omni.png","exploreomni",[13,17,20,23,26],{"name":14,"slug":15,"type":16},"Omni","omni","tag",{"name":18,"slug":19,"type":16},"Data Analysis","data-analysis",{"name":21,"slug":22,"type":16},"CLI","cli",{"name":24,"slug":25,"type":16},"Analytics","analytics",{"name":27,"slug":28,"type":16},"SQL","sql",27,"https:\u002F\u002Fgithub.com\u002Fexploreomni\u002Fomni-agent-skills","2026-04-06T18:10:56.974412",null,3,[],{"repoUrl":30,"stars":29,"forks":33,"topics":36,"description":37},[],"A collection of skill for working with Omni. These skills help AI agents understand and execute Omni workflows more effectively.","https:\u002F\u002Fgithub.com\u002Fexploreomni\u002Fomni-agent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fomni-query","---\nname: omni-query\ndescription: Run queries against Omni Analytics' semantic layer using the Omni CLI, interpret results, and chain queries for multi-step analysis. Use this skill whenever someone wants to query data through Omni, run a report, get metrics, pull numbers, analyze data, ask \"how many\" \u002F \"what's the trend\" \u002F \"show me the data\", retrieve dashboard query results, or extract data from an existing dashboard or workbook. Also use for table calculations and computed columns (running totals, percent-of-total, month-over-month \u002F period-over-period change, moving averages, rankings), open-ended multi-step analysis via agentic AI jobs, and running raw SQL through the semantic layer — even when the user doesn't say \"query\" (e.g. \"add a running total column\", \"what's our MoM growth\", \"analyze revenue trends\"). For building or editing a dashboard or chart use omni-content-builder; for adding a field or measure to the model use omni-model-builder — this skill retrieves and computes over data.\n---\n\n# Omni Query\n\nRun queries against Omni's semantic layer via the Omni CLI. Omni translates field selections into optimized SQL — you specify what you want (dimensions, measures, filters), not how to get it.\n\n> **Tip**: Use `omni-model-explorer` first if you don't know the available topics and fields.\n\n## Prerequisites\n\n```bash\n# Verify the Omni CLI is installed — if not, ask the user to install it\n# See: https:\u002F\u002Fgithub.com\u002Fexploreomni\u002Fcli#readme\ncommand -v omni >\u002Fdev\u002Fnull || echo \"ERROR: Omni CLI is not installed.\"\n```\n\n```bash\n# Show available profiles and select the appropriate one\nomni config show\n# If multiple profiles exist, ask the user which to use, then switch:\nomni config use \u003Cprofile-name>\n\n# Confirm the active profile is authenticated and inspect your permissions:\nomni whoami whoami\n```\n\n> **Auth**: a profile authenticates with an **API key** or **OAuth**. If `whoami` (or any call) returns **401**, hand off — ask the user to run `! omni config login \u003Cprofile>` (OAuth 2.1 browser flow; it blocks ~2 min on the browser). Don't run `config login` yourself in a headless\u002FCI session (no browser → timeout); on a local interactive machine you *may*. See the **`omni-api-conventions`** rule for profile setup (`omni config init --auth oauth`) and discovering request-body shapes with `--schema`.\n\nYou also need a **model ID** and knowledge of available **topics and fields**.\n\n## Discovering Commands\n\n```bash\nomni query --help              # List query operations\nomni query run --help          # Show flags for running a query\nomni query run --schema        # Print the body's JSON schema + a filled example (no token)\nomni ai --help                 # AI-powered query generation\n```\n\n> **Tip**: Use `-o json` to force structured output for programmatic parsing, or `-o human` for readable tables. The default is `auto` (human in a TTY, JSON when piped).\n\n## Known Issues & Safe Defaults\n\n- **When handed SQL, default to reproducing its intent on a topic** — read what the SQL does (grain, measures, filters, joins), then check whether a topic can express it (`omni-model-explorer`; `omni ai pick-topic` \u002F `omni ai generate-query --run-query=false`). Reach for raw `userEditedSQL` only when no topic fits, or when the user explicitly asks to run their SQL as-is. See *Running Raw SQL*. Don't passthrough SQL by reflex (you're not a text-to-SQL generator), and don't force-fit a topic that doesn't match.\n- When the user asks for a **calculated column**, **table calculation**, **running total**, **moving average**, **percent change**, **row total**, **tier label**, **VLOOKUP**, **SUMIF**, or **date difference**, satisfy it with a `calculations[]` table calc selected in `query.fields`. Do not substitute an existing model field, `userEditedSQL`, client-side math, or a narrative-only explanation unless the user explicitly asks for that alternative.\n- **Keep table-calc answers auditable.** Don't call the task complete until the final answer names the calc column and shows that same `calc_name` in **both** `query.fields` and `calculations[]` (true even for simple operators like `OMNI_RUNNING_TOTAL`). Include a compact query-JSON excerpt — `query.fields`, the real `calculations[]` object with operators\u002Foperands intact, relevant `pivots[]`\u002F`limit`, and the validation result — not a paraphrase like `{ \"OMNI_OFFSET_MULTI over\": \"field\" }` or \"computed via `OMNI_RUNNING_TOTAL`.\" Long CSV can bury the query shape; show a few rows plus the reusable shape, or say you're omitting the full JSON for brevity.\n- If a calc query succeeds but the calc column is blank, treat it as a failed calc until proven otherwise. Re-check operand order, `for_calc`, date truncation, `outside_pivot`, and whether the `calc_name` appears in `query.fields`.\n- **Don't swallow calc errors while authoring or validating.** Keep `swallow_errors: false` (the default) so a bad calc fails loudly with the real message. With `swallow_errors: true`, the column silently shows `#ERROR!` and the query still returns `COMPLETE` — easy to misread as data, a blank calc, or an engine bug. If you see `#ERROR!`, re-run with `swallow_errors: false` to surface the cause (often a referenced field missing from `query.fields`). When re-running a calc query you pulled from a document, dashboard tile, or `omni ai` job, run it **verbatim** — dropping a field the calc references manufactures an error that isn't the calc's fault. Reserve `swallow_errors: true` for a finalized tile that needs per-cell resilience, and validate it with `false` first. See `references\u002Ftable-calculations.md` §5.11 & §6.5.\n- Prefer the documented Omni calc operators over lower-level raw SQL\u002Fwindow ASTs when a template exists. For example, use `Omni.OMNI_RUNNING_TOTAL`, `Omni.OMNI_PERCENT_CHANGE_FROM_PREVIOUS`, and `Omni.OMNI_FX_AVERAGE(Omni.OMNI_OFFSET_MULTI(...))` for moving averages instead of hand-authored `window_call`\u002F`LAG` when the prompt asks for a table calculation.\n\n## Build queries on a topic\n\nPrefer building every query **on a topic**, not a bare base view. Topics carry the governed joins, labels, and access — and **a query not built on a topic is not accessible to restricted queriers\u002Fviewers** (it works for you as a modeler\u002Fadmin but silently fails for restricted roles). Set the query `table` to the topic's base view and pass `join_paths_from_topic_name: \u003Ctopic>`.\n\n**How the join map resolves joined-view fields.** `table` stays the topic's **base view**; `join_paths_from_topic_name` lets the topic's join map reach *joined*-view fields from it — e.g. to select `users.state` on an `order_items`-based topic, `table` stays `order_items` and the join comes from the topic; you do **not** set `table: users`. Omit `join_paths_from_topic_name` (or point `table` at a non-base view) and joined-view fields may fail to resolve or join wrong. Confirm the base view and every reachable join with `omni models get-topic \u003CmodelId> \u003Ctopic>` — its `base_view_name` and `join_via_map` show the base view and the join path to each reachable view. (This is the canonical topic-query shape; `omni-content-builder` tiles and `omni-model-builder` validation queries use it too.)\n\n**Decide where the query should come from:**\n1. **An existing topic answers it** (its base view + a join-reachable view) → query that topic.\n2. **The field is on a join-reachable view but the topic doesn't expose it \u002F lacks the join** → propose *extending* the topic (add the relationship\u002Fjoin), then build it via `omni-model-builder`.\n3. **Fundamentally different subject, constraints, or audience** → propose a *new* topic (see the \"new topic vs extend\" criteria in `omni-model-builder`). Prompt the requestor first, and build it on a branch.\n\n**Fallback — non-topic query pathways.** Two pathways run *outside* any topic: a **bare base view** (`table:` + the global `relationships` file for joins) and **raw SQL** (`userEditedSQL`, see \"Running Raw SQL\"). Both share the same caveat: topic-scoped controls — **access filters** (row-level) and **always_where** — are not applied, and in a dashboard the tile is **invisible to Viewer \u002F Restricted Querier roles by default** (handling a restricted audience is a content-permission concern — see **`omni-content-builder`**). The two pathways differ on **object-level access grants**: a bare-view query still enforces them, but raw SQL bypasses them too (it's the most permissive pathway). Prefer a topic when one fits; reach for a non-topic pathway only when nothing else expresses the query.\n\nWhen the conclusion is \"build or modify a topic,\" hand off to **`omni-model-builder`** to do it right.\n\n## Running a Query\n\n### Basic Query\n\n```bash\nomni query run --body '{\n  \"query\": {\n    \"modelId\": \"your-model-id\",\n    \"table\": \"order_items\",\n    \"fields\": [\n      \"order_items.created_at[month]\",\n      \"order_items.total_revenue\"\n    ],\n    \"limit\": 100,\n    \"join_paths_from_topic_name\": \"order_items\"\n  }\n}'\n```\n\n### Query Parameters\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `modelId` | Yes | UUID of the Omni model |\n| `table` | Conditional | Base view (the `FROM`). Required for a semantic query **unless** `join_paths_from_topic_name` is set (base view comes from the topic) or `userEditedSQL` is used (table ignored). |\n| `fields` | Yes | Array of `view.field_name` references |\n| `join_paths_from_topic_name` | Recommended | Topic for join resolution |\n| `limit` | No | Row limit (default 1000, max 50000, `null` for unlimited) |\n| `sorts` | No | Array of sort objects |\n| `filters` | No | Filter object |\n| `pivots` | No | Array of field names to pivot on |\n\n### Field Naming\n\nFields use `view_name.field_name`. Date fields support timeframe brackets:\n\n```\nusers.created_at[date]      — Daily\nusers.created_at[week]      — Weekly\nusers.created_at[month]     — Monthly\nusers.created_at[quarter]   — Quarterly\nusers.created_at[year]      — Yearly\n```\n\n### Sorts\n\n```json\n\"sorts\": [\n  { \"column_name\": \"order_items.total_revenue\", \"sort_descending\": true }\n]\n```\n\n### Filters\n\n```json\n\"filters\": {\n  \"order_items.created_at\": \"last 90 days\",\n  \"order_items.status\": \"complete\",\n  \"users.state\": \"California,New York\"\n}\n```\n\nExpressions: `\"last 90 days\"`, `\"this quarter\"`, `\"2024-01-01 to 2024-12-31\"`, `\"not California\"`, `\"null\"`, `\"not null\"`, `\">100\"`, `\"between 10 and 100\"`, `\"contains sales\"`, `\"starts with A\"`. See [references\u002Ffilter-expressions.md](references\u002Ffilter-expressions.md) for the complete expression syntax reference.\n\nIf a date filter string fails with an API error like `Cannot use 'in' operator\nto search for 'query_id' in last 12 months`, keep the query semantic and retry\nwith the typed date-filter object shape instead of dropping the filter:\n\n```json\n\"filters\": {\n  \"order_items.created_at\": {\n    \"type\": \"date\",\n    \"kind\": \"TIME_FOR_INTERVAL_DURATION\",\n    \"left_side\": \"12 months ago\",\n    \"right_side\": \"12 months\",\n    \"ui_type\": \"PAST\"\n  }\n}\n```\n\n### Pivots\n\n```json\n{\n  \"query\": {\n    \"fields\": [\"order_items.created_at[month]\", \"order_items.status\", \"order_items.count\"],\n    \"pivots\": [\"order_items.status\"],\n    \"join_paths_from_topic_name\": \"order_items\"\n  }\n}\n```\n\n**Pivoted queries reject `limit: null`** — pass an explicit numeric limit (e.g., `5000`). Unlimited is only allowed when `pivots[]` is empty.\n\n### Transpose measures into rows (`transposed_measures`)\n\nFolds several **measures** from one wide row into **long form** — one row per measure — so the measures become a category you can chart against (e.g. a funnel, or a \"measures on the axis\" bar). `transposed_measures` is an **array of the measure field names** to fold (the same names you put in `fields`), **not a boolean** — passing `true` is silently rejected (`z.array(z.string())`), yielding an empty result.\n\n```json\n{\n  \"query\": {\n    \"table\": \"order_items\",\n    \"fields\": [\"order_items.units_sold\", \"order_items.shipped_items\", \"order_items.delivered_items\"],\n    \"transposed_measures\": [\"order_items.units_sold\", \"order_items.shipped_items\", \"order_items.delivered_items\"],\n    \"join_paths_from_topic_name\": \"order_items\"\n  }\n}\n```\n\nThe result gains three synthetic columns at the first transposed measure's position:\n- **`measure_name`** — the measure's field name; **renders as the measure's friendly label** in a viz (e.g. \"Units Sold\").\n- **`measure_order`** — `0, 1, 2, …` in the order listed (the stage order).\n- **`measure_value`** — that measure's value for the row.\n\nThis is the supported way to build a **funnel from multiple measures** (Omni's funnel needs a stage *dimension* + one measure, not N measures): chart `measure_name` as the stage and `measure_value` as the value. See `omni-content-builder` → *Config Object: Funnel*.\n\n### Table Calculations\n\nPost-query computed columns (running totals, % of total, ratios, conditionals). Authored as AST objects in `calculations[]`. The query API requires the parsed AST — it does **not** accept the workbook-frontend `{name, formula}` shape.\n\nMinimum-viable calc:\n\n```json\n{\n  \"query\": {\n    \"fields\": [\"orders.month\", \"orders.total_revenue\", \"calc_pct\"],\n    \"calculations\": [{\n      \"calc_name\": \"calc_pct\",\n      \"label\": \"% of Total\",\n      \"format\": \"0.0%\",\n      \"sql_expression\": {\n        \"type\": \"call\",\n        \"operator\": \"Omni.OMNI_PERCENT_OF_TOTAL\",\n        \"operands\": [\n          { \"type\": \"field\", \"field_name\": \"orders.total_revenue\", \"for_calc\": true }\n        ]\n      }\n    }]\n  }\n}\n```\n\n**The #1 gotcha:** `calc_name` must also appear in `query.fields` (and the outer `queryPresentation.fields` for dashboard tiles). A calc defined in `calculations[]` but absent from `fields` is computed but never rendered.\n\nThe five quick-template operators (each takes one `field` operand with `for_calc: true`):\n`Omni.OMNI_PERCENT_OF_TOTAL`, `Omni.OMNI_PERCENT_OF_PREVIOUS`, `Omni.OMNI_PERCENT_CHANGE_FROM_PREVIOUS`, `Omni.OMNI_RUNNING_TOTAL`, `Omni.OMNI_RANK`.\n\nUse `omni query run` with a hand-authored or copied AST when you already know the calc shape. **To *generate* anything non-trivial — table calculations, period-over-period, multi-step analysis — prefer the agentic path (`omni ai job-submit`):** it authors calcs that `generate-query` silently drops (e.g. month-over-month % change). To get a *reusable* AST out of an agentic job, lift the structured query \u002F `calculations` from the job's **`actions[].generate_query`** result (not the `resultSummary`, and not a `userEditedSQL`\u002FSQL fallback), then **re-run *your assembled* query** with `swallow_errors:false` and **diff the values against the job's `csvResult`**. The job already executed the calc, so the re-run isn't re-proving the math — it's checking your *reshape* (a dropped\u002Frenamed field is the kind of translation failure that \"it ran and returned rows\" would miss; see [table-calculations.md](references\u002Ftable-calculations.md) §6). Reserve `generate-query` for simple deterministic single queries, and for shape-only drafting where query execution isn't permitted.\n\nQuery tasks are read-only unless the user explicitly asks to change the model. If a field appears missing, inspect topics\u002Fdashboard queries and use the right model\u002Ftopic\u002Fbranch or report the missing-field blocker — don't create branches, add measures, or edit YAML just to make a query work. (And don't satisfy a calc request with client-side math or an existing model field like `users.tier_label` — build and validate the table calc; see *Known Issues*.)\n\nQuick recipes for common calc requests:\n\n- **Percent of total**: add a calc using `Omni.OMNI_PERCENT_OF_TOTAL` with one `for_calc: true` operand pointing at the selected measure field; set `format: \"0.0%\"`; include the calc name in `query.fields`.\n- **Running total**: add a calc using `Omni.OMNI_RUNNING_TOTAL` with one `for_calc: true` field operand. Sort the time dimension ascending before presenting values; do not sort descending and then reverse\u002Frecompute the running total outside Omni.\n- **Trailing 3-period moving average**: if you are unsure of the exact AST, harvest it from an agentic job — `omni ai job-submit \u003CmodelId> \"monthly revenue with a trailing 3-month moving average as a table calculation\"`, lift the `calculations` from `actions[].generate_query`, then validate with `query run` (`generate-query --run-query=false` is the simple\u002Fshape-only fallback). The expected shape is `Omni.OMNI_FX_AVERAGE` over `Omni.OMNI_OFFSET_MULTI(field, -2, 0, 3, 1)`. If the output is a raw `window_call`, rewrite it to this canonical Omni calc shape unless the user specifically asked for a custom SQL window not expressible with Omni calc operators.\n- **Month-over-month % change**: add a calc using `Omni.OMNI_PERCENT_CHANGE_FROM_PREVIOUS` with the same single `for_calc: true` revenue operand; sort the date field ascending; set `format: \"0.0%\"`; do not use `omni_period_pivot`, raw SQL, or a hand-authored `LAG` window when the template operator fits.\n- **Row total across pivot columns**: for a pivoted query, set a numeric `limit` and add a calc with `outside_pivot: true`, `Omni.OMNI_FX_SUM`, and `Omni.OMNI_PIVOT_OFFSET(field, 0, 0, 1, 50)` to sweep across pivot columns. Include the row-total `calc_name` in `query.fields`; a pivoted query with `limit: null` is invalid.\n- **Multi-branch tier labels**: use `Omni.OMNI_FX_IFS`, not an existing model field or `SqlStdOperatorTable.CASE`, for prompts like `High if revenue > 10000, Mid if > 1000, else Low`. `OMNI_FX_IFS` operands alternate `(condition, value)`. Represent the default branch as a final tautology such as `SqlStdOperatorTable.EQUALS(1, 1)` followed by `\"Low\"`. Build labels like `\"High - Acme Corp\"` with nested binary `Omni.OMNI_FX_AMPERSAND` calls: `(tier & \" - \") & \u003Cname field>`. If the tier depends on a grouped measure, create two calcs: one for the tier and one for the concatenated label.\n- **SUMIF-style filtered total broadcast on every row**: use `Omni.OMNI_FX_SUM_IF` (underscore between `SUM` and `IF`). Both the criteria range and sum range must be full-column `Omni.OMNI_OFFSET_MULTI` calls with `(field, -536870911, 0, 1073741823, 1)`. The criterion is a string literal like `\"Complete\"`, not a SQL predicate.\n- **VLOOKUP-style in-result lookup**: first attempt `Omni.OMNI_FX_VLOOKUP` with four operands: lookup value, key field, full-column `OMNI_OFFSET_MULTI` over the key field, and a 1-based column number into `query.fields` starting at the key column. Use literal nodes for static lookup values and column numbers. Validate the query. If a static string lookup like `\"Complete\"` fails with `No referenced query with id Complete found in query`, report that this Omni deployment is treating the string as a query reference, stop retrying VLOOKUP variants, and use the `OMNI_FX_SUM_IF` broadcast pattern when the user needs a single status revenue repeated on every row. Do not replace this with `userEditedSQL`.\n- **Date difference**: use `Omni.OMNI_FX_DATEDIF` in AST order `(unit_literal, start_date, end_date)`, with the unit literal `\"DAY\"` and date-truncated operands such as `created_at[date]` and `shipped_at[date]`. Do not substitute a native model field unless the user asked for that existing field rather than a calculated column. A bare timestamp operand can produce blank values under `swallow_errors`; select `[date]` timeframes or cast to DATE. Filter out or separately explain null shipped dates so the validated diff column contains populated integer values.\n\nFor exact JSON AST examples — running totals, moving averages, conditional labels, pivot row totals, DATEDIF, SUM_IF, VLOOKUP, plus the full operator catalog (`Omni.*` and `SqlStdOperatorTable.*`), AST node types, validation rules, and the round-trip strategy for unfamiliar calcs — see [references\u002Ftable-calculations.md](references\u002Ftable-calculations.md). Keep `SKILL.md` as the workflow guardrail and the reference file as the source of detailed shapes.\n\nAt execution, calcs compile into an outer `SELECT` wrapping the base aggregation; window-style operators emit `... OVER (...)` there, so the shared data model never needs window functions to support them. In pivoted queries, template operators auto-partition by the pivot column for per-segment series; set `outside_pivot: true` and wrap an aggregator around `OMNI_PIVOT_OFFSET` for a row-summary that sweeps across pivot columns.\n\n## Running Raw SQL (`userEditedSQL`)\n\n> **Given SQL? Reproduce it through a topic first** (see *Known Issues*). Express the SQL's intent through the semantic layer; reach for raw `userEditedSQL` only when no topic can express it (SQL-first migration, warehouse-specific SQL, one-off ad-hoc read) or the user asks to run it as-is. If a faithful reproduction would need a field\u002Ftopic that doesn't exist but *should*, propose modeling it (`omni-model-builder`) rather than defaulting to raw SQL.\n>\n> **Reading `generate-query` output:** when the topic lacks a measure the metric needs, `generate-query` returns a **`${}`-templated `userEditedSQL`** (e.g. `SUM(${view.sale_price}) AS sale_price_sum FROM ${Topic}`) and lists its SQL-output aliases (like `sale_price_sum`) in `fields`. Those aliases are **not model fields** — don't strip the SQL and try to run them semantically (they won't resolve). And the `${Topic}` token resolves **only inside `generate-query`'s own execution** — the templated query is **not** directly runnable via `query run` or persistable as a dashboard tile (it errors with `No such view \"Order Items\"`). So don't reuse it as-is; treat it as a **signal that the topic is missing a measure** and add that measure (`omni-model-builder`) so the metric becomes a clean semantic field.\n\n`userEditedSQL` is a **non-topic query pathway** — the same family as a bare-view query (see \"Fallback — non-topic query pathways\"). It's an escape hatch for SQL the semantic layer can't express; prefer a topic or semantic fields when they fit.\n\n```bash\nomni query run --body '{\n  \"query\": {\n    \"modelId\": \"\u003Cmodel-id>\",\n    \"fields\": [],\n    \"userEditedSQL\": \"select count(*) as cnt from ECOMM.ORDER_ITEMS\"\n  }\n}'\n```\n\n- **`fields` must be present** (an array; may be empty `[]`); `table` is not needed. The SQL is authoritative — populated `fields`\u002F`table` are ignored when `userEditedSQL` is set.\n- Runs against the model's **connection** — write warehouse-dialect SQL with fully-qualified names, not field references.\n- **`\"rewriteSql\": false`** runs your SQL verbatim (the default parses and re-emits it — re-quoting identifiers, aliasing projections into the `view.field` namespace). **`\"dbtMode\": true`** allows Jinja\u002Fdbt templating. (Both are camelCase; the `query` object is permissive, so a misspelled\u002Fsnake_case key is silently dropped.)\n- **Permission-gated:** the querier's role must permit manually-written SQL. Without it the job fails — `error_type: \"FORBIDDEN\"`, *\"queries based on manually written SQL are restricted\"* — returned as **HTTP 200 with the error in the job body**, not a 4xx.\n- **Access behavior:** raw SQL bypasses **all** model controls — object-level **access grants**, row-level **access filters**, and **always_where** — and is invisible to Viewer\u002FRestricted Querier roles in a dashboard. It's the most permissive pathway; use only for ad-hoc reads by privileged users, and **strip it from any reused\u002Fdashboard query** (see \"Using Job Results in a Dashboard\").\n- **Row cap:** an unbounded raw query is capped at **50,000 rows** (the response returns 50,001 — the cap plus one truncation sentinel). The envelope `limit` is **not** applied to raw SQL; put `LIMIT` in the SQL itself to bound results.\n\n## Request-level options (outside `query`)\n\nThese keys sit at the **top level** of the body, beside `query`, not inside it:\n\n| Option | Description |\n|--------|-------------|\n| `resultType` | Output format: `csv`, `xlsx`, or `json`. Omit for the default base64 Arrow response. |\n| `cache` | Cache policy: `Standard`, `SkipRequery`, `SkipCache`. |\n| `userId` | Run as another user (org-scoped API keys); also the `--userid` flag. |\n| `branchId` | Run against a model **branch** (validate draft model changes on live data). Must be a branch of the same shared model. |\n| `planOnly` | Return the execution plan **without running** the query (validate\u002Fdebug at no warehouse cost). Cannot combine with `resultType`. |\n| `formatResults` | On exports, emit **formatted** values (e.g. `$1,234.56`) vs. raw. Requires `resultType`; ignored for Arrow. |\n| `timezone` | Per-request timezone override (IANA id). Requires the connection setting `allowsUserSpecificTimezones` **and** the org setting `allowsDocumentCanUseTimezoneOverride`; silently no-ops if either is off. |\n\n## Handling and Validating Results\n\nDefault response: base64-encoded Apache Arrow table. Arrow results are binary — you cannot parse individual row data from the raw response. To verify a query returned data, check `summary.row_count` in the response.\n\nTo read the results yourself (to validate or spot-check), request **`resultType: \"csv\"`** or **`\"json\"`** — both come back as text you can parse directly:\n\n```json\n{ \"query\": { ... }, \"resultType\": \"csv\" }\n```\n\n`resultType: \"xlsx\"` is also valid, but it returns a **binary** `.xlsx` file (zip-based) — like the default Arrow blob, you can't read it inline without a spreadsheet app or a library. Use it only to **deliver a file** to a person, not to inspect results. For agent-side reading, stick to `csv`\u002F`json`.\n\n### Result Validation\n\nEvery query response should be checked before trusting the results or presenting them to the user.\n\n**Check for errors:**\n- If the response contains an `error` key, the query failed. Common causes: bad field name, missing join path, malformed filter expression, permission error.\n- If the response contains `remaining_job_ids`, the query is still running — poll with `omni query wait` before checking results.\n\n**Check row count:**\n- `summary.row_count == 0` — the query returned no data. This may be valid (e.g., no data in the filter range) but is worth flagging to the user. Common causes: overly restrictive filters, wrong date range, field that doesn't match any rows.\n- `summary.row_count` equals the `limit` you set — results may be truncated. If the user needs complete data, re-run with a higher limit or `null` for unlimited.\n\n**Spot-check data with CSV:**\n\nWhen accuracy matters, request CSV and scan the output:\n\n```bash\nomni query run --body '{\n  \"query\": { ... },\n  \"resultType\": \"csv\"\n}'\n```\n\nCheck that:\n- Column headers match the fields you requested\n- Values are in expected ranges (e.g., revenue isn't negative, dates aren't in the future)\n- Aggregations make sense (e.g., a count isn't returning a sum)\n\n**Validate filter behavior:**\n\nIf your query includes filters, verify they're being applied:\n\n```bash\n# Run the same query without filters\nomni query run --body '{ \"query\": { ... (no filters) ... }, \"resultType\": \"csv\" }'\n\n# Compare row counts — filtered should be \u003C= unfiltered\n```\n\nIf both queries return the same row count, the filter may not be binding (wrong field name, unsupported expression, or the known bug where boolean filters are dropped with pivots).\n\n### Validation Checklist\n\n| Check | How | When |\n|-------|-----|------|\n| No error in response | Check for `error` key | Every query |\n| Data was returned | `summary.row_count > 0` | Every query |\n| Results not truncated | `row_count \u003C limit` | When completeness matters |\n| Columns are correct | CSV column headers match requested fields | When building dashboards or reports |\n| Values are reasonable | Spot-check CSV output | When presenting to users |\n| Filters are applied | Compare filtered vs unfiltered row counts | When using filters |\n| Long-running query completed | No `remaining_job_ids` in final response | Queries on large tables |\n\n### Decoding Arrow Results\n\n```python\nimport base64, pyarrow as pa\narrow_bytes = base64.b64decode(response[\"data\"])\nreader = pa.ipc.open_stream(arrow_bytes)\ndf = reader.read_all().to_pandas()\n```\n\n### Long-Running Queries\n\nIf the response includes `remaining_job_ids`, poll until complete:\n\n```bash\nomni query wait --jobids job-id-1,job-id-2\n```\n\n## Running Queries from Dashboards\n\nExtract and re-run queries powering existing dashboards:\n\n```bash\n# Get all queries from a dashboard\nomni documents get-queries \u003CdashboardId>\n\n# Run as a specific user\nomni query run --body '{ \"query\": { ... }, \"userId\": \"user-uuid-here\" }'\n\n# Cache policy (valid values: Standard, SkipRequery, SkipCache)\nomni query run --body '{ \"query\": { ... }, \"cache\": \"SkipCache\" }'\n```\n\n## AI-Powered Query Generation\n\nInstead of constructing query JSON manually, you can describe what you want in natural language and let Omni's AI generate the query.\n\n### Generate Query (synchronous)\n\nThe fastest path — returns a generated query JSON synchronously. Pass `--run-query false` to get only the query structure without executing it (default runs the query).\n\n```bash\n# Just generate the query JSON (no execution)\nomni ai generate-query your-model-id \"Show me revenue by month\" --run-query false\n```\n\nResponse:\n\n```json\n{\n  \"query\": {\n    \"fields\": [\"order_items.created_at[month]\", \"order_items.total_revenue\"],\n    \"table\": \"order_items\",\n    \"filters\": {},\n    \"sorts\": [{\"column_name\": \"order_items.created_at[month]\", \"sort_descending\": false}],\n    \"limit\": 500\n  },\n  \"topic\": \"order_items\",\n  \"error\": null\n}\n```\n\n```bash\n# Generate and execute in one call\nomni ai generate-query your-model-id \"Top 10 customers by lifetime spend\"\n```\n\nOptional flags:\n- `--branch-id` — test against a specific model branch\n- `--current-topic-name` — constrain topic selection to a specific topic\n\n### Pick Topic\n\nCheck which topic the AI would select for a question, without generating a full query:\n\n```bash\nomni ai pick-topic your-model-id \"How many users signed up last month?\"\n```\n\n### Agentic Queries (async)\n\nFor the full Blobby experience — multi-step analysis, tool use, and topic selection as the AI would actually behave in production. This is async: submit a job, poll for status, then retrieve the result.\n\n```bash\n# 1. Submit a job\nomni ai job-submit your-model-id \"Analyze revenue trends and identify our fastest growing product category\"\n# → returns { \"jobId\": \"job-uuid\", \"conversationId\": \"conv-uuid\" }\n\n# 2. Poll the `state` field (NOT `status` — reading `.status` is empty every time)\nomni ai job-status \u003CjobId>\n\n# 3. Get the result\nomni ai job-result \u003CjobId>\n```\n\n> **Job-status shape.** Poll **`state`** — `omni ai job-status` has **no `status` field**. States: `QUEUED` → `EXECUTING` → `DELIVERING` → terminal **`COMPLETE`** \u002F `FAILED` \u002F `CANCELLED`. Note it's `COMPLETE`, **not** `COMPLETED` — the model-refresh (`completed`) and `models jobs-get-status` (`COMPLETED`) flows spell it differently, so a poll loop reused across job types needs a **tolerant terminal check**: read the field as `state ?? status`, lowercase it, treat `startswith(\"complete\")` as done and `{failed, cancelled, error}` as failed. The answer text is **`resultSummary`**; structured output is under **`actions[]`** (`type: \"generate_query\"` → `result.query`).\n\nThe result contains an `actions` array with each step the AI took — look for actions with `type: \"generate_query\"` to extract the generated queries. The response also includes `resultSummary` with the AI's narrative interpretation.\n\nBefore presenting an async job answer, inspect the `actions[]` entries. A job can reach `COMPLETE` while an individual `generate_query` action has `status: \"pending\"` or no `csvResult`; the narrative may then describe a query that was generated but not executed. If a required action is pending, do not treat the job summary as final. Run or regenerate that specific query, or continue the same analysis with another async job, then present only validated results.\n\nAdditional job commands:\n- `omni ai job-cancel \u003CjobId>` — cancel a running job\n- `omni ai job-visualization \u003CjobId>` — get the visualization output\n\n### Using Job Results in a Dashboard\n\nThe query object inside a job result is **not directly usable** as a dashboard `queryPresentation` — it requires a transformation. Key rules:\n\n- **Always strip `userEditedSQL`** — it makes the tile a non-topic query, so it bypasses **all** model controls (object-level access grants, row-level access filters, and `always_where`) and is invisible to restricted roles in a dashboard. The `${Order Items}` topic-name token it contains also fails outside the job execution context.\n- **When `calculations[]` is non-empty**, stripping `userEditedSQL` is sufficient — the structured calc renders correctly.\n- **When `calculations[]` is empty**, Blobby authored the calc as inline SQL. The parsed AST is available in `csvResultFields` (at `result` level, not inside `result[\"query\"]`) and can be reconstructed as a proper `calculations[]` entry. Fields whose top-level expr operator is an aggregate (`SUM`, `COUNT`, etc.) cannot be reconstructed as table calcs — add them to the model as filtered measures instead.\n\nFor the complete transformation algorithm, discriminator logic, field-ref injection, aggregate-skip handling, and sanity-check approach, see [references\u002Fjob-result-to-presentation.md](references\u002Fjob-result-to-presentation.md).\n\n### When to Use Which Approach\n\n| Approach | Best For |\n|----------|----------|\n| `omni query run` | You know exactly which fields, filters, and sorts you need |\n| `omni query run` with `calculations[]` | Explicit table-calculation requests where you know or can copy the AST shape |\n| `omni ai generate-query --run-query=false` | Drafting a **simple** query AST to inspect\u002Fhand-edit; **or shape-only when query execution isn't permitted** (the fallback when you can't run an agentic job) |\n| `omni ai generate-query --run-query=true` | Simple dimension\u002Fmeasure queries where you want a synchronous response |\n| `omni ai job-submit` | **Anything non-trivial** — multi-step analysis, **or generating a table calc \u002F reusable query AST**. Lift the structured query\u002F`calculations` from `actions[].generate_query`, then validate with `query run` |\n\n**Steer the prompt when you know the shape:** when a table calculation is the desired or known-correct output, say so in the prompt — append \"… *as a table calculation*\", or name the semantics (\"running total\" \u002F \"% of total\" \u002F \"moving average\") — so the agentic job emits a real calc in `actions[].generate_query` rather than a `userEditedSQL`\u002FSQL fallback. (The agentic-vs-`generate-query` split and the \"lift the AST from `actions[].generate_query`, then validate with `query run`\" rule are in the table above and under *Table Calculations*.)\n\n## Multi-Step Analysis Pattern\n\nFor complex analysis, chain queries:\n\n1. **Broad query** — understand the shape of the data\n2. **Inspect results** — identify interesting segments or patterns\n3. **Focused follow-ups** — filter based on findings\n4. **Synthesize** — combine results into a narrative\n\n## Common Query Patterns\n\n**Time Series**: fields + date dimension + ascending sort + date filter\n\n**Top N**: fields + metric + descending sort + limit\n\n**Aggregation with Breakdown**: multiple dimensions + multiple measures + descending sort by key metric\n\n## Known Bugs\n\n- **`IS_NOT_NULL` filter generates `IS NULL`** (reported Omni bug) — workaround: invert the filter logic or use the base view to apply the filter differently.\n- **Boolean filters may be silently dropped** when a `pivots` array is present — if boolean filters aren't applying, remove the pivot and test again.\n- **Some natural-language date filter strings can hit `query_id` parser errors** — retry with the typed date filter object shape shown above before abandoning the filter.\n\n## Linking to Results\n\nQueries are ephemeral — there is no persistent URL for a query result. To give the user a shareable link:\n\n- **For existing dashboards**: `{OMNI_BASE_URL}\u002Fdashboards\u002F{identifier}` (the `identifier` comes from the document API response)\n- **For new analysis**: Create a document via `omni-content-builder` with the query as a `queryPresentation`, then share `{OMNI_BASE_URL}\u002Fdashboards\u002F{identifier}`\n\n## Docs Reference\n\n- [Query API](https:\u002F\u002Fdocs.omni.co\u002Fapi\u002Fqueries.md) · [Running Document Queries](https:\u002F\u002Fdocs.omni.co\u002Fguides\u002Frun-document-queries.md) · [Querying Documentation](https:\u002F\u002Fdocs.omni.co\u002Fanalyze-explore\u002Fquerying.md) · [Filter Syntax](https:\u002F\u002Fdocs.omni.co\u002Fmodeling\u002Ffilters.md)\n\n## Related Skills\n\n- **omni-model-explorer** — discover fields and topics before querying\n- **omni-content-explorer** — find dashboards whose queries you can extract\n- **omni-content-builder** — turn query results into dashboards\n- **omni-ai-eval** — benchmark and test AI query generation accuracy\n",{"data":41,"body":42},{"name":4,"description":6},{"type":43,"children":44},"root",[45,53,59,83,90,178,294,387,405,411,511,546,552,966,972,1006,1141,1149,1210,1301,1316,1322,1329,1464,1470,1715,1721,1734,1744,1749,1864,1869,2015,2099,2112,2362,2367,2564,2595,2609,2672,2934,2939,2999,3045,3051,3077,3082,3595,3640,3692,3829,3849,3854,4363,4397,4433,4445,4614,4631,4714,4930,4942,4961,5215,5221,5234,5260,5338,5382,5388,5393,5401,5438,5446,5484,5492,5497,5558,5563,5581,5589,5594,5656,5661,5667,5841,5847,5888,5894,5906,5939,5945,5950,6094,6100,6105,6111,6124,6183,6188,6515,6562,6567,6592,6598,6603,6643,6649,6654,6805,7004,7031,7073,7078,7103,7109,7129,7253,7264,7270,7422,7478,7484,7489,7532,7538,7548,7558,7568,7574,7634,7640,7645,7702,7708,7747,7753,7794],{"type":46,"tag":47,"props":48,"children":49},"element","h1",{"id":4},[50],{"type":51,"value":52},"text","Omni Query",{"type":46,"tag":54,"props":55,"children":56},"p",{},[57],{"type":51,"value":58},"Run queries against Omni's semantic layer via the Omni CLI. Omni translates field selections into optimized SQL — you specify what you want (dimensions, measures, filters), not how to get it.",{"type":46,"tag":60,"props":61,"children":62},"blockquote",{},[63],{"type":46,"tag":54,"props":64,"children":65},{},[66,72,74,81],{"type":46,"tag":67,"props":68,"children":69},"strong",{},[70],{"type":51,"value":71},"Tip",{"type":51,"value":73},": Use ",{"type":46,"tag":75,"props":76,"children":78},"code",{"className":77},[],[79],{"type":51,"value":80},"omni-model-explorer",{"type":51,"value":82}," first if you don't know the available topics and fields.",{"type":46,"tag":84,"props":85,"children":87},"h2",{"id":86},"prerequisites",[88],{"type":51,"value":89},"Prerequisites",{"type":46,"tag":91,"props":92,"children":97},"pre",{"className":93,"code":94,"language":95,"meta":96,"style":96},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Verify the Omni CLI is installed — if not, ask the user to install it\n# See: https:\u002F\u002Fgithub.com\u002Fexploreomni\u002Fcli#readme\ncommand -v omni >\u002Fdev\u002Fnull || echo \"ERROR: Omni CLI is not installed.\"\n","bash","",[98],{"type":46,"tag":75,"props":99,"children":100},{"__ignoreMap":96},[101,113,122],{"type":46,"tag":102,"props":103,"children":106},"span",{"class":104,"line":105},"line",1,[107],{"type":46,"tag":102,"props":108,"children":110},{"style":109},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[111],{"type":51,"value":112},"# Verify the Omni CLI is installed — if not, ask the user to install it\n",{"type":46,"tag":102,"props":114,"children":116},{"class":104,"line":115},2,[117],{"type":46,"tag":102,"props":118,"children":119},{"style":109},[120],{"type":51,"value":121},"# See: https:\u002F\u002Fgithub.com\u002Fexploreomni\u002Fcli#readme\n",{"type":46,"tag":102,"props":123,"children":124},{"class":104,"line":33},[125,131,137,142,148,153,158,163,168,173],{"type":46,"tag":102,"props":126,"children":128},{"style":127},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[129],{"type":51,"value":130},"command",{"type":46,"tag":102,"props":132,"children":134},{"style":133},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[135],{"type":51,"value":136}," -v",{"type":46,"tag":102,"props":138,"children":139},{"style":133},[140],{"type":51,"value":141}," omni",{"type":46,"tag":102,"props":143,"children":145},{"style":144},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[146],{"type":51,"value":147}," >",{"type":46,"tag":102,"props":149,"children":150},{"style":133},[151],{"type":51,"value":152},"\u002Fdev\u002Fnull",{"type":46,"tag":102,"props":154,"children":155},{"style":144},[156],{"type":51,"value":157}," ||",{"type":46,"tag":102,"props":159,"children":160},{"style":127},[161],{"type":51,"value":162}," echo",{"type":46,"tag":102,"props":164,"children":165},{"style":144},[166],{"type":51,"value":167}," \"",{"type":46,"tag":102,"props":169,"children":170},{"style":133},[171],{"type":51,"value":172},"ERROR: Omni CLI is not installed.",{"type":46,"tag":102,"props":174,"children":175},{"style":144},[176],{"type":51,"value":177},"\"\n",{"type":46,"tag":91,"props":179,"children":181},{"className":93,"code":180,"language":95,"meta":96,"style":96},"# Show available profiles and select the appropriate one\nomni config show\n# If multiple profiles exist, ask the user which to use, then switch:\nomni config use \u003Cprofile-name>\n\n# Confirm the active profile is authenticated and inspect your permissions:\nomni whoami whoami\n",[182],{"type":46,"tag":75,"props":183,"children":184},{"__ignoreMap":96},[185,193,211,219,257,267,276],{"type":46,"tag":102,"props":186,"children":187},{"class":104,"line":105},[188],{"type":46,"tag":102,"props":189,"children":190},{"style":109},[191],{"type":51,"value":192},"# Show available profiles and select the appropriate one\n",{"type":46,"tag":102,"props":194,"children":195},{"class":104,"line":115},[196,201,206],{"type":46,"tag":102,"props":197,"children":199},{"style":198},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[200],{"type":51,"value":15},{"type":46,"tag":102,"props":202,"children":203},{"style":133},[204],{"type":51,"value":205}," config",{"type":46,"tag":102,"props":207,"children":208},{"style":133},[209],{"type":51,"value":210}," show\n",{"type":46,"tag":102,"props":212,"children":213},{"class":104,"line":33},[214],{"type":46,"tag":102,"props":215,"children":216},{"style":109},[217],{"type":51,"value":218},"# If multiple profiles exist, ask the user which to use, then switch:\n",{"type":46,"tag":102,"props":220,"children":222},{"class":104,"line":221},4,[223,227,231,236,241,246,252],{"type":46,"tag":102,"props":224,"children":225},{"style":198},[226],{"type":51,"value":15},{"type":46,"tag":102,"props":228,"children":229},{"style":133},[230],{"type":51,"value":205},{"type":46,"tag":102,"props":232,"children":233},{"style":133},[234],{"type":51,"value":235}," use",{"type":46,"tag":102,"props":237,"children":238},{"style":144},[239],{"type":51,"value":240}," \u003C",{"type":46,"tag":102,"props":242,"children":243},{"style":133},[244],{"type":51,"value":245},"profile-nam",{"type":46,"tag":102,"props":247,"children":249},{"style":248},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[250],{"type":51,"value":251},"e",{"type":46,"tag":102,"props":253,"children":254},{"style":144},[255],{"type":51,"value":256},">\n",{"type":46,"tag":102,"props":258,"children":260},{"class":104,"line":259},5,[261],{"type":46,"tag":102,"props":262,"children":264},{"emptyLinePlaceholder":263},true,[265],{"type":51,"value":266},"\n",{"type":46,"tag":102,"props":268,"children":270},{"class":104,"line":269},6,[271],{"type":46,"tag":102,"props":272,"children":273},{"style":109},[274],{"type":51,"value":275},"# Confirm the active profile is authenticated and inspect your permissions:\n",{"type":46,"tag":102,"props":277,"children":279},{"class":104,"line":278},7,[280,284,289],{"type":46,"tag":102,"props":281,"children":282},{"style":198},[283],{"type":51,"value":15},{"type":46,"tag":102,"props":285,"children":286},{"style":133},[287],{"type":51,"value":288}," whoami",{"type":46,"tag":102,"props":290,"children":291},{"style":133},[292],{"type":51,"value":293}," whoami\n",{"type":46,"tag":60,"props":295,"children":296},{},[297],{"type":46,"tag":54,"props":298,"children":299},{},[300,305,307,312,314,319,321,327,329,334,336,342,344,350,352,358,360,369,371,377,379,385],{"type":46,"tag":67,"props":301,"children":302},{},[303],{"type":51,"value":304},"Auth",{"type":51,"value":306},": a profile authenticates with an ",{"type":46,"tag":67,"props":308,"children":309},{},[310],{"type":51,"value":311},"API key",{"type":51,"value":313}," or ",{"type":46,"tag":67,"props":315,"children":316},{},[317],{"type":51,"value":318},"OAuth",{"type":51,"value":320},". If ",{"type":46,"tag":75,"props":322,"children":324},{"className":323},[],[325],{"type":51,"value":326},"whoami",{"type":51,"value":328}," (or any call) returns ",{"type":46,"tag":67,"props":330,"children":331},{},[332],{"type":51,"value":333},"401",{"type":51,"value":335},", hand off — ask the user to run ",{"type":46,"tag":75,"props":337,"children":339},{"className":338},[],[340],{"type":51,"value":341},"! omni config login \u003Cprofile>",{"type":51,"value":343}," (OAuth 2.1 browser flow; it blocks ~2 min on the browser). Don't run ",{"type":46,"tag":75,"props":345,"children":347},{"className":346},[],[348],{"type":51,"value":349},"config login",{"type":51,"value":351}," yourself in a headless\u002FCI session (no browser → timeout); on a local interactive machine you ",{"type":46,"tag":353,"props":354,"children":355},"em",{},[356],{"type":51,"value":357},"may",{"type":51,"value":359},". See the ",{"type":46,"tag":67,"props":361,"children":362},{},[363],{"type":46,"tag":75,"props":364,"children":366},{"className":365},[],[367],{"type":51,"value":368},"omni-api-conventions",{"type":51,"value":370}," rule for profile setup (",{"type":46,"tag":75,"props":372,"children":374},{"className":373},[],[375],{"type":51,"value":376},"omni config init --auth oauth",{"type":51,"value":378},") and discovering request-body shapes with ",{"type":46,"tag":75,"props":380,"children":382},{"className":381},[],[383],{"type":51,"value":384},"--schema",{"type":51,"value":386},".",{"type":46,"tag":54,"props":388,"children":389},{},[390,392,397,399,404],{"type":51,"value":391},"You also need a ",{"type":46,"tag":67,"props":393,"children":394},{},[395],{"type":51,"value":396},"model ID",{"type":51,"value":398}," and knowledge of available ",{"type":46,"tag":67,"props":400,"children":401},{},[402],{"type":51,"value":403},"topics and fields",{"type":51,"value":386},{"type":46,"tag":84,"props":406,"children":408},{"id":407},"discovering-commands",[409],{"type":51,"value":410},"Discovering Commands",{"type":46,"tag":91,"props":412,"children":414},{"className":93,"code":413,"language":95,"meta":96,"style":96},"omni query --help              # List query operations\nomni query run --help          # Show flags for running a query\nomni query run --schema        # Print the body's JSON schema + a filled example (no token)\nomni ai --help                 # AI-powered query generation\n",[415],{"type":46,"tag":75,"props":416,"children":417},{"__ignoreMap":96},[418,440,465,490],{"type":46,"tag":102,"props":419,"children":420},{"class":104,"line":105},[421,425,430,435],{"type":46,"tag":102,"props":422,"children":423},{"style":198},[424],{"type":51,"value":15},{"type":46,"tag":102,"props":426,"children":427},{"style":133},[428],{"type":51,"value":429}," query",{"type":46,"tag":102,"props":431,"children":432},{"style":133},[433],{"type":51,"value":434}," --help",{"type":46,"tag":102,"props":436,"children":437},{"style":109},[438],{"type":51,"value":439},"              # List query operations\n",{"type":46,"tag":102,"props":441,"children":442},{"class":104,"line":115},[443,447,451,456,460],{"type":46,"tag":102,"props":444,"children":445},{"style":198},[446],{"type":51,"value":15},{"type":46,"tag":102,"props":448,"children":449},{"style":133},[450],{"type":51,"value":429},{"type":46,"tag":102,"props":452,"children":453},{"style":133},[454],{"type":51,"value":455}," run",{"type":46,"tag":102,"props":457,"children":458},{"style":133},[459],{"type":51,"value":434},{"type":46,"tag":102,"props":461,"children":462},{"style":109},[463],{"type":51,"value":464},"          # Show flags for running a query\n",{"type":46,"tag":102,"props":466,"children":467},{"class":104,"line":33},[468,472,476,480,485],{"type":46,"tag":102,"props":469,"children":470},{"style":198},[471],{"type":51,"value":15},{"type":46,"tag":102,"props":473,"children":474},{"style":133},[475],{"type":51,"value":429},{"type":46,"tag":102,"props":477,"children":478},{"style":133},[479],{"type":51,"value":455},{"type":46,"tag":102,"props":481,"children":482},{"style":133},[483],{"type":51,"value":484}," --schema",{"type":46,"tag":102,"props":486,"children":487},{"style":109},[488],{"type":51,"value":489},"        # Print the body's JSON schema + a filled example (no token)\n",{"type":46,"tag":102,"props":491,"children":492},{"class":104,"line":221},[493,497,502,506],{"type":46,"tag":102,"props":494,"children":495},{"style":198},[496],{"type":51,"value":15},{"type":46,"tag":102,"props":498,"children":499},{"style":133},[500],{"type":51,"value":501}," ai",{"type":46,"tag":102,"props":503,"children":504},{"style":133},[505],{"type":51,"value":434},{"type":46,"tag":102,"props":507,"children":508},{"style":109},[509],{"type":51,"value":510},"                 # AI-powered query generation\n",{"type":46,"tag":60,"props":512,"children":513},{},[514],{"type":46,"tag":54,"props":515,"children":516},{},[517,521,522,528,530,536,538,544],{"type":46,"tag":67,"props":518,"children":519},{},[520],{"type":51,"value":71},{"type":51,"value":73},{"type":46,"tag":75,"props":523,"children":525},{"className":524},[],[526],{"type":51,"value":527},"-o json",{"type":51,"value":529}," to force structured output for programmatic parsing, or ",{"type":46,"tag":75,"props":531,"children":533},{"className":532},[],[534],{"type":51,"value":535},"-o human",{"type":51,"value":537}," for readable tables. The default is ",{"type":46,"tag":75,"props":539,"children":541},{"className":540},[],[542],{"type":51,"value":543},"auto",{"type":51,"value":545}," (human in a TTY, JSON when piped).",{"type":46,"tag":84,"props":547,"children":549},{"id":548},"known-issues-safe-defaults",[550],{"type":51,"value":551},"Known Issues & Safe Defaults",{"type":46,"tag":553,"props":554,"children":555},"ul",{},[556,605,696,788,822,923],{"type":46,"tag":557,"props":558,"children":559},"li",{},[560,565,567,572,574,580,582,588,590,596,598,603],{"type":46,"tag":67,"props":561,"children":562},{},[563],{"type":51,"value":564},"When handed SQL, default to reproducing its intent on a topic",{"type":51,"value":566}," — read what the SQL does (grain, measures, filters, joins), then check whether a topic can express it (",{"type":46,"tag":75,"props":568,"children":570},{"className":569},[],[571],{"type":51,"value":80},{"type":51,"value":573},"; ",{"type":46,"tag":75,"props":575,"children":577},{"className":576},[],[578],{"type":51,"value":579},"omni ai pick-topic",{"type":51,"value":581}," \u002F ",{"type":46,"tag":75,"props":583,"children":585},{"className":584},[],[586],{"type":51,"value":587},"omni ai generate-query --run-query=false",{"type":51,"value":589},"). Reach for raw ",{"type":46,"tag":75,"props":591,"children":593},{"className":592},[],[594],{"type":51,"value":595},"userEditedSQL",{"type":51,"value":597}," only when no topic fits, or when the user explicitly asks to run their SQL as-is. See ",{"type":46,"tag":353,"props":599,"children":600},{},[601],{"type":51,"value":602},"Running Raw SQL",{"type":51,"value":604},". Don't passthrough SQL by reflex (you're not a text-to-SQL generator), and don't force-fit a topic that doesn't match.",{"type":46,"tag":557,"props":606,"children":607},{},[608,610,615,617,622,623,628,629,634,635,640,641,646,647,652,653,658,659,664,666,671,673,679,681,687,689,694],{"type":51,"value":609},"When the user asks for a ",{"type":46,"tag":67,"props":611,"children":612},{},[613],{"type":51,"value":614},"calculated column",{"type":51,"value":616},", ",{"type":46,"tag":67,"props":618,"children":619},{},[620],{"type":51,"value":621},"table calculation",{"type":51,"value":616},{"type":46,"tag":67,"props":624,"children":625},{},[626],{"type":51,"value":627},"running total",{"type":51,"value":616},{"type":46,"tag":67,"props":630,"children":631},{},[632],{"type":51,"value":633},"moving average",{"type":51,"value":616},{"type":46,"tag":67,"props":636,"children":637},{},[638],{"type":51,"value":639},"percent change",{"type":51,"value":616},{"type":46,"tag":67,"props":642,"children":643},{},[644],{"type":51,"value":645},"row total",{"type":51,"value":616},{"type":46,"tag":67,"props":648,"children":649},{},[650],{"type":51,"value":651},"tier label",{"type":51,"value":616},{"type":46,"tag":67,"props":654,"children":655},{},[656],{"type":51,"value":657},"VLOOKUP",{"type":51,"value":616},{"type":46,"tag":67,"props":660,"children":661},{},[662],{"type":51,"value":663},"SUMIF",{"type":51,"value":665},", or ",{"type":46,"tag":67,"props":667,"children":668},{},[669],{"type":51,"value":670},"date difference",{"type":51,"value":672},", satisfy it with a ",{"type":46,"tag":75,"props":674,"children":676},{"className":675},[],[677],{"type":51,"value":678},"calculations[]",{"type":51,"value":680}," table calc selected in ",{"type":46,"tag":75,"props":682,"children":684},{"className":683},[],[685],{"type":51,"value":686},"query.fields",{"type":51,"value":688},". Do not substitute an existing model field, ",{"type":46,"tag":75,"props":690,"children":692},{"className":691},[],[693],{"type":51,"value":595},{"type":51,"value":695},", client-side math, or a narrative-only explanation unless the user explicitly asks for that alternative.",{"type":46,"tag":557,"props":697,"children":698},{},[699,704,706,712,714,719,721,726,728,733,735,741,743,748,750,755,757,763,765,771,773,779,781,786],{"type":46,"tag":67,"props":700,"children":701},{},[702],{"type":51,"value":703},"Keep table-calc answers auditable.",{"type":51,"value":705}," Don't call the task complete until the final answer names the calc column and shows that same ",{"type":46,"tag":75,"props":707,"children":709},{"className":708},[],[710],{"type":51,"value":711},"calc_name",{"type":51,"value":713}," in ",{"type":46,"tag":67,"props":715,"children":716},{},[717],{"type":51,"value":718},"both",{"type":51,"value":720}," ",{"type":46,"tag":75,"props":722,"children":724},{"className":723},[],[725],{"type":51,"value":686},{"type":51,"value":727}," and ",{"type":46,"tag":75,"props":729,"children":731},{"className":730},[],[732],{"type":51,"value":678},{"type":51,"value":734}," (true even for simple operators like ",{"type":46,"tag":75,"props":736,"children":738},{"className":737},[],[739],{"type":51,"value":740},"OMNI_RUNNING_TOTAL",{"type":51,"value":742},"). Include a compact query-JSON excerpt — ",{"type":46,"tag":75,"props":744,"children":746},{"className":745},[],[747],{"type":51,"value":686},{"type":51,"value":749},", the real ",{"type":46,"tag":75,"props":751,"children":753},{"className":752},[],[754],{"type":51,"value":678},{"type":51,"value":756}," object with operators\u002Foperands intact, relevant ",{"type":46,"tag":75,"props":758,"children":760},{"className":759},[],[761],{"type":51,"value":762},"pivots[]",{"type":51,"value":764},"\u002F",{"type":46,"tag":75,"props":766,"children":768},{"className":767},[],[769],{"type":51,"value":770},"limit",{"type":51,"value":772},", and the validation result — not a paraphrase like ",{"type":46,"tag":75,"props":774,"children":776},{"className":775},[],[777],{"type":51,"value":778},"{ \"OMNI_OFFSET_MULTI over\": \"field\" }",{"type":51,"value":780}," or \"computed via ",{"type":46,"tag":75,"props":782,"children":784},{"className":783},[],[785],{"type":51,"value":740},{"type":51,"value":787},".\" Long CSV can bury the query shape; show a few rows plus the reusable shape, or say you're omitting the full JSON for brevity.",{"type":46,"tag":557,"props":789,"children":790},{},[791,793,799,801,807,809,814,816,821],{"type":51,"value":792},"If a calc query succeeds but the calc column is blank, treat it as a failed calc until proven otherwise. Re-check operand order, ",{"type":46,"tag":75,"props":794,"children":796},{"className":795},[],[797],{"type":51,"value":798},"for_calc",{"type":51,"value":800},", date truncation, ",{"type":46,"tag":75,"props":802,"children":804},{"className":803},[],[805],{"type":51,"value":806},"outside_pivot",{"type":51,"value":808},", and whether the ",{"type":46,"tag":75,"props":810,"children":812},{"className":811},[],[813],{"type":51,"value":711},{"type":51,"value":815}," appears in ",{"type":46,"tag":75,"props":817,"children":819},{"className":818},[],[820],{"type":51,"value":686},{"type":51,"value":386},{"type":46,"tag":557,"props":823,"children":824},{},[825,830,832,838,840,846,848,854,856,862,864,869,871,876,878,883,885,891,893,898,900,905,907,913,915,921],{"type":46,"tag":67,"props":826,"children":827},{},[828],{"type":51,"value":829},"Don't swallow calc errors while authoring or validating.",{"type":51,"value":831}," Keep ",{"type":46,"tag":75,"props":833,"children":835},{"className":834},[],[836],{"type":51,"value":837},"swallow_errors: false",{"type":51,"value":839}," (the default) so a bad calc fails loudly with the real message. With ",{"type":46,"tag":75,"props":841,"children":843},{"className":842},[],[844],{"type":51,"value":845},"swallow_errors: true",{"type":51,"value":847},", the column silently shows ",{"type":46,"tag":75,"props":849,"children":851},{"className":850},[],[852],{"type":51,"value":853},"#ERROR!",{"type":51,"value":855}," and the query still returns ",{"type":46,"tag":75,"props":857,"children":859},{"className":858},[],[860],{"type":51,"value":861},"COMPLETE",{"type":51,"value":863}," — easy to misread as data, a blank calc, or an engine bug. If you see ",{"type":46,"tag":75,"props":865,"children":867},{"className":866},[],[868],{"type":51,"value":853},{"type":51,"value":870},", re-run with ",{"type":46,"tag":75,"props":872,"children":874},{"className":873},[],[875],{"type":51,"value":837},{"type":51,"value":877}," to surface the cause (often a referenced field missing from ",{"type":46,"tag":75,"props":879,"children":881},{"className":880},[],[882],{"type":51,"value":686},{"type":51,"value":884},"). When re-running a calc query you pulled from a document, dashboard tile, or ",{"type":46,"tag":75,"props":886,"children":888},{"className":887},[],[889],{"type":51,"value":890},"omni ai",{"type":51,"value":892}," job, run it ",{"type":46,"tag":67,"props":894,"children":895},{},[896],{"type":51,"value":897},"verbatim",{"type":51,"value":899}," — dropping a field the calc references manufactures an error that isn't the calc's fault. Reserve ",{"type":46,"tag":75,"props":901,"children":903},{"className":902},[],[904],{"type":51,"value":845},{"type":51,"value":906}," for a finalized tile that needs per-cell resilience, and validate it with ",{"type":46,"tag":75,"props":908,"children":910},{"className":909},[],[911],{"type":51,"value":912},"false",{"type":51,"value":914}," first. See ",{"type":46,"tag":75,"props":916,"children":918},{"className":917},[],[919],{"type":51,"value":920},"references\u002Ftable-calculations.md",{"type":51,"value":922}," §5.11 & §6.5.",{"type":46,"tag":557,"props":924,"children":925},{},[926,928,934,935,941,943,949,951,957,958,964],{"type":51,"value":927},"Prefer the documented Omni calc operators over lower-level raw SQL\u002Fwindow ASTs when a template exists. For example, use ",{"type":46,"tag":75,"props":929,"children":931},{"className":930},[],[932],{"type":51,"value":933},"Omni.OMNI_RUNNING_TOTAL",{"type":51,"value":616},{"type":46,"tag":75,"props":936,"children":938},{"className":937},[],[939],{"type":51,"value":940},"Omni.OMNI_PERCENT_CHANGE_FROM_PREVIOUS",{"type":51,"value":942},", and ",{"type":46,"tag":75,"props":944,"children":946},{"className":945},[],[947],{"type":51,"value":948},"Omni.OMNI_FX_AVERAGE(Omni.OMNI_OFFSET_MULTI(...))",{"type":51,"value":950}," for moving averages instead of hand-authored ",{"type":46,"tag":75,"props":952,"children":954},{"className":953},[],[955],{"type":51,"value":956},"window_call",{"type":51,"value":764},{"type":46,"tag":75,"props":959,"children":961},{"className":960},[],[962],{"type":51,"value":963},"LAG",{"type":51,"value":965}," when the prompt asks for a table calculation.",{"type":46,"tag":84,"props":967,"children":969},{"id":968},"build-queries-on-a-topic",[970],{"type":51,"value":971},"Build queries on a topic",{"type":46,"tag":54,"props":973,"children":974},{},[975,977,982,984,989,991,997,999,1005],{"type":51,"value":976},"Prefer building every query ",{"type":46,"tag":67,"props":978,"children":979},{},[980],{"type":51,"value":981},"on a topic",{"type":51,"value":983},", not a bare base view. Topics carry the governed joins, labels, and access — and ",{"type":46,"tag":67,"props":985,"children":986},{},[987],{"type":51,"value":988},"a query not built on a topic is not accessible to restricted queriers\u002Fviewers",{"type":51,"value":990}," (it works for you as a modeler\u002Fadmin but silently fails for restricted roles). Set the query ",{"type":46,"tag":75,"props":992,"children":994},{"className":993},[],[995],{"type":51,"value":996},"table",{"type":51,"value":998}," to the topic's base view and pass ",{"type":46,"tag":75,"props":1000,"children":1002},{"className":1001},[],[1003],{"type":51,"value":1004},"join_paths_from_topic_name: \u003Ctopic>",{"type":51,"value":386},{"type":46,"tag":54,"props":1007,"children":1008},{},[1009,1014,1015,1020,1022,1027,1028,1034,1036,1041,1043,1049,1051,1057,1059,1064,1066,1071,1073,1078,1080,1086,1088,1093,1095,1100,1102,1108,1110,1116,1117,1123,1125,1131,1133,1139],{"type":46,"tag":67,"props":1010,"children":1011},{},[1012],{"type":51,"value":1013},"How the join map resolves joined-view fields.",{"type":51,"value":720},{"type":46,"tag":75,"props":1016,"children":1018},{"className":1017},[],[1019],{"type":51,"value":996},{"type":51,"value":1021}," stays the topic's ",{"type":46,"tag":67,"props":1023,"children":1024},{},[1025],{"type":51,"value":1026},"base view",{"type":51,"value":573},{"type":46,"tag":75,"props":1029,"children":1031},{"className":1030},[],[1032],{"type":51,"value":1033},"join_paths_from_topic_name",{"type":51,"value":1035}," lets the topic's join map reach ",{"type":46,"tag":353,"props":1037,"children":1038},{},[1039],{"type":51,"value":1040},"joined",{"type":51,"value":1042},"-view fields from it — e.g. to select ",{"type":46,"tag":75,"props":1044,"children":1046},{"className":1045},[],[1047],{"type":51,"value":1048},"users.state",{"type":51,"value":1050}," on an ",{"type":46,"tag":75,"props":1052,"children":1054},{"className":1053},[],[1055],{"type":51,"value":1056},"order_items",{"type":51,"value":1058},"-based topic, ",{"type":46,"tag":75,"props":1060,"children":1062},{"className":1061},[],[1063],{"type":51,"value":996},{"type":51,"value":1065}," stays ",{"type":46,"tag":75,"props":1067,"children":1069},{"className":1068},[],[1070],{"type":51,"value":1056},{"type":51,"value":1072}," and the join comes from the topic; you do ",{"type":46,"tag":67,"props":1074,"children":1075},{},[1076],{"type":51,"value":1077},"not",{"type":51,"value":1079}," set ",{"type":46,"tag":75,"props":1081,"children":1083},{"className":1082},[],[1084],{"type":51,"value":1085},"table: users",{"type":51,"value":1087},". Omit ",{"type":46,"tag":75,"props":1089,"children":1091},{"className":1090},[],[1092],{"type":51,"value":1033},{"type":51,"value":1094}," (or point ",{"type":46,"tag":75,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":51,"value":996},{"type":51,"value":1101}," at a non-base view) and joined-view fields may fail to resolve or join wrong. Confirm the base view and every reachable join with ",{"type":46,"tag":75,"props":1103,"children":1105},{"className":1104},[],[1106],{"type":51,"value":1107},"omni models get-topic \u003CmodelId> \u003Ctopic>",{"type":51,"value":1109}," — its ",{"type":46,"tag":75,"props":1111,"children":1113},{"className":1112},[],[1114],{"type":51,"value":1115},"base_view_name",{"type":51,"value":727},{"type":46,"tag":75,"props":1118,"children":1120},{"className":1119},[],[1121],{"type":51,"value":1122},"join_via_map",{"type":51,"value":1124}," show the base view and the join path to each reachable view. (This is the canonical topic-query shape; ",{"type":46,"tag":75,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":51,"value":1130},"omni-content-builder",{"type":51,"value":1132}," tiles and ",{"type":46,"tag":75,"props":1134,"children":1136},{"className":1135},[],[1137],{"type":51,"value":1138},"omni-model-builder",{"type":51,"value":1140}," validation queries use it too.)",{"type":46,"tag":54,"props":1142,"children":1143},{},[1144],{"type":46,"tag":67,"props":1145,"children":1146},{},[1147],{"type":51,"value":1148},"Decide where the query should come from:",{"type":46,"tag":1150,"props":1151,"children":1152},"ol",{},[1153,1163,1186],{"type":46,"tag":557,"props":1154,"children":1155},{},[1156,1161],{"type":46,"tag":67,"props":1157,"children":1158},{},[1159],{"type":51,"value":1160},"An existing topic answers it",{"type":51,"value":1162}," (its base view + a join-reachable view) → query that topic.",{"type":46,"tag":557,"props":1164,"children":1165},{},[1166,1171,1173,1178,1180,1185],{"type":46,"tag":67,"props":1167,"children":1168},{},[1169],{"type":51,"value":1170},"The field is on a join-reachable view but the topic doesn't expose it \u002F lacks the join",{"type":51,"value":1172}," → propose ",{"type":46,"tag":353,"props":1174,"children":1175},{},[1176],{"type":51,"value":1177},"extending",{"type":51,"value":1179}," the topic (add the relationship\u002Fjoin), then build it via ",{"type":46,"tag":75,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":51,"value":1138},{"type":51,"value":386},{"type":46,"tag":557,"props":1187,"children":1188},{},[1189,1194,1196,1201,1203,1208],{"type":46,"tag":67,"props":1190,"children":1191},{},[1192],{"type":51,"value":1193},"Fundamentally different subject, constraints, or audience",{"type":51,"value":1195}," → propose a ",{"type":46,"tag":353,"props":1197,"children":1198},{},[1199],{"type":51,"value":1200},"new",{"type":51,"value":1202}," topic (see the \"new topic vs extend\" criteria in ",{"type":46,"tag":75,"props":1204,"children":1206},{"className":1205},[],[1207],{"type":51,"value":1138},{"type":51,"value":1209},"). Prompt the requestor first, and build it on a branch.",{"type":46,"tag":54,"props":1211,"children":1212},{},[1213,1218,1220,1225,1227,1232,1234,1240,1242,1248,1250,1255,1256,1261,1263,1268,1270,1275,1277,1282,1284,1292,1294,1299],{"type":46,"tag":67,"props":1214,"children":1215},{},[1216],{"type":51,"value":1217},"Fallback — non-topic query pathways.",{"type":51,"value":1219}," Two pathways run ",{"type":46,"tag":353,"props":1221,"children":1222},{},[1223],{"type":51,"value":1224},"outside",{"type":51,"value":1226}," any topic: a ",{"type":46,"tag":67,"props":1228,"children":1229},{},[1230],{"type":51,"value":1231},"bare base view",{"type":51,"value":1233}," (",{"type":46,"tag":75,"props":1235,"children":1237},{"className":1236},[],[1238],{"type":51,"value":1239},"table:",{"type":51,"value":1241}," + the global ",{"type":46,"tag":75,"props":1243,"children":1245},{"className":1244},[],[1246],{"type":51,"value":1247},"relationships",{"type":51,"value":1249}," file for joins) and ",{"type":46,"tag":67,"props":1251,"children":1252},{},[1253],{"type":51,"value":1254},"raw SQL",{"type":51,"value":1233},{"type":46,"tag":75,"props":1257,"children":1259},{"className":1258},[],[1260],{"type":51,"value":595},{"type":51,"value":1262},", see \"Running Raw SQL\"). Both share the same caveat: topic-scoped controls — ",{"type":46,"tag":67,"props":1264,"children":1265},{},[1266],{"type":51,"value":1267},"access filters",{"type":51,"value":1269}," (row-level) and ",{"type":46,"tag":67,"props":1271,"children":1272},{},[1273],{"type":51,"value":1274},"always_where",{"type":51,"value":1276}," — are not applied, and in a dashboard the tile is ",{"type":46,"tag":67,"props":1278,"children":1279},{},[1280],{"type":51,"value":1281},"invisible to Viewer \u002F Restricted Querier roles by default",{"type":51,"value":1283}," (handling a restricted audience is a content-permission concern — see ",{"type":46,"tag":67,"props":1285,"children":1286},{},[1287],{"type":46,"tag":75,"props":1288,"children":1290},{"className":1289},[],[1291],{"type":51,"value":1130},{"type":51,"value":1293},"). The two pathways differ on ",{"type":46,"tag":67,"props":1295,"children":1296},{},[1297],{"type":51,"value":1298},"object-level access grants",{"type":51,"value":1300},": a bare-view query still enforces them, but raw SQL bypasses them too (it's the most permissive pathway). Prefer a topic when one fits; reach for a non-topic pathway only when nothing else expresses the query.",{"type":46,"tag":54,"props":1302,"children":1303},{},[1304,1306,1314],{"type":51,"value":1305},"When the conclusion is \"build or modify a topic,\" hand off to ",{"type":46,"tag":67,"props":1307,"children":1308},{},[1309],{"type":46,"tag":75,"props":1310,"children":1312},{"className":1311},[],[1313],{"type":51,"value":1138},{"type":51,"value":1315}," to do it right.",{"type":46,"tag":84,"props":1317,"children":1319},{"id":1318},"running-a-query",[1320],{"type":51,"value":1321},"Running a Query",{"type":46,"tag":1323,"props":1324,"children":1326},"h3",{"id":1325},"basic-query",[1327],{"type":51,"value":1328},"Basic Query",{"type":46,"tag":91,"props":1330,"children":1332},{"className":93,"code":1331,"language":95,"meta":96,"style":96},"omni query run --body '{\n  \"query\": {\n    \"modelId\": \"your-model-id\",\n    \"table\": \"order_items\",\n    \"fields\": [\n      \"order_items.created_at[month]\",\n      \"order_items.total_revenue\"\n    ],\n    \"limit\": 100,\n    \"join_paths_from_topic_name\": \"order_items\"\n  }\n}'\n",[1333],{"type":46,"tag":75,"props":1334,"children":1335},{"__ignoreMap":96},[1336,1366,1374,1382,1390,1398,1406,1414,1423,1432,1441,1450],{"type":46,"tag":102,"props":1337,"children":1338},{"class":104,"line":105},[1339,1343,1347,1351,1356,1361],{"type":46,"tag":102,"props":1340,"children":1341},{"style":198},[1342],{"type":51,"value":15},{"type":46,"tag":102,"props":1344,"children":1345},{"style":133},[1346],{"type":51,"value":429},{"type":46,"tag":102,"props":1348,"children":1349},{"style":133},[1350],{"type":51,"value":455},{"type":46,"tag":102,"props":1352,"children":1353},{"style":133},[1354],{"type":51,"value":1355}," --body",{"type":46,"tag":102,"props":1357,"children":1358},{"style":144},[1359],{"type":51,"value":1360}," '",{"type":46,"tag":102,"props":1362,"children":1363},{"style":133},[1364],{"type":51,"value":1365},"{\n",{"type":46,"tag":102,"props":1367,"children":1368},{"class":104,"line":115},[1369],{"type":46,"tag":102,"props":1370,"children":1371},{"style":133},[1372],{"type":51,"value":1373},"  \"query\": {\n",{"type":46,"tag":102,"props":1375,"children":1376},{"class":104,"line":33},[1377],{"type":46,"tag":102,"props":1378,"children":1379},{"style":133},[1380],{"type":51,"value":1381},"    \"modelId\": \"your-model-id\",\n",{"type":46,"tag":102,"props":1383,"children":1384},{"class":104,"line":221},[1385],{"type":46,"tag":102,"props":1386,"children":1387},{"style":133},[1388],{"type":51,"value":1389},"    \"table\": \"order_items\",\n",{"type":46,"tag":102,"props":1391,"children":1392},{"class":104,"line":259},[1393],{"type":46,"tag":102,"props":1394,"children":1395},{"style":133},[1396],{"type":51,"value":1397},"    \"fields\": [\n",{"type":46,"tag":102,"props":1399,"children":1400},{"class":104,"line":269},[1401],{"type":46,"tag":102,"props":1402,"children":1403},{"style":133},[1404],{"type":51,"value":1405},"      \"order_items.created_at[month]\",\n",{"type":46,"tag":102,"props":1407,"children":1408},{"class":104,"line":278},[1409],{"type":46,"tag":102,"props":1410,"children":1411},{"style":133},[1412],{"type":51,"value":1413},"      \"order_items.total_revenue\"\n",{"type":46,"tag":102,"props":1415,"children":1417},{"class":104,"line":1416},8,[1418],{"type":46,"tag":102,"props":1419,"children":1420},{"style":133},[1421],{"type":51,"value":1422},"    ],\n",{"type":46,"tag":102,"props":1424,"children":1426},{"class":104,"line":1425},9,[1427],{"type":46,"tag":102,"props":1428,"children":1429},{"style":133},[1430],{"type":51,"value":1431},"    \"limit\": 100,\n",{"type":46,"tag":102,"props":1433,"children":1435},{"class":104,"line":1434},10,[1436],{"type":46,"tag":102,"props":1437,"children":1438},{"style":133},[1439],{"type":51,"value":1440},"    \"join_paths_from_topic_name\": \"order_items\"\n",{"type":46,"tag":102,"props":1442,"children":1444},{"class":104,"line":1443},11,[1445],{"type":46,"tag":102,"props":1446,"children":1447},{"style":133},[1448],{"type":51,"value":1449},"  }\n",{"type":46,"tag":102,"props":1451,"children":1453},{"class":104,"line":1452},12,[1454,1459],{"type":46,"tag":102,"props":1455,"children":1456},{"style":133},[1457],{"type":51,"value":1458},"}",{"type":46,"tag":102,"props":1460,"children":1461},{"style":144},[1462],{"type":51,"value":1463},"'\n",{"type":46,"tag":1323,"props":1465,"children":1467},{"id":1466},"query-parameters",[1468],{"type":51,"value":1469},"Query Parameters",{"type":46,"tag":996,"props":1471,"children":1472},{},[1473,1497],{"type":46,"tag":1474,"props":1475,"children":1476},"thead",{},[1477],{"type":46,"tag":1478,"props":1479,"children":1480},"tr",{},[1481,1487,1492],{"type":46,"tag":1482,"props":1483,"children":1484},"th",{},[1485],{"type":51,"value":1486},"Parameter",{"type":46,"tag":1482,"props":1488,"children":1489},{},[1490],{"type":51,"value":1491},"Required",{"type":46,"tag":1482,"props":1493,"children":1494},{},[1495],{"type":51,"value":1496},"Description",{"type":46,"tag":1498,"props":1499,"children":1500},"tbody",{},[1501,1524,1573,1602,1623,1652,1673,1694],{"type":46,"tag":1478,"props":1502,"children":1503},{},[1504,1514,1519],{"type":46,"tag":1505,"props":1506,"children":1507},"td",{},[1508],{"type":46,"tag":75,"props":1509,"children":1511},{"className":1510},[],[1512],{"type":51,"value":1513},"modelId",{"type":46,"tag":1505,"props":1515,"children":1516},{},[1517],{"type":51,"value":1518},"Yes",{"type":46,"tag":1505,"props":1520,"children":1521},{},[1522],{"type":51,"value":1523},"UUID of the Omni model",{"type":46,"tag":1478,"props":1525,"children":1526},{},[1527,1535,1540],{"type":46,"tag":1505,"props":1528,"children":1529},{},[1530],{"type":46,"tag":75,"props":1531,"children":1533},{"className":1532},[],[1534],{"type":51,"value":996},{"type":46,"tag":1505,"props":1536,"children":1537},{},[1538],{"type":51,"value":1539},"Conditional",{"type":46,"tag":1505,"props":1541,"children":1542},{},[1543,1545,1551,1553,1558,1559,1564,1566,1571],{"type":51,"value":1544},"Base view (the ",{"type":46,"tag":75,"props":1546,"children":1548},{"className":1547},[],[1549],{"type":51,"value":1550},"FROM",{"type":51,"value":1552},"). Required for a semantic query ",{"type":46,"tag":67,"props":1554,"children":1555},{},[1556],{"type":51,"value":1557},"unless",{"type":51,"value":720},{"type":46,"tag":75,"props":1560,"children":1562},{"className":1561},[],[1563],{"type":51,"value":1033},{"type":51,"value":1565}," is set (base view comes from the topic) or ",{"type":46,"tag":75,"props":1567,"children":1569},{"className":1568},[],[1570],{"type":51,"value":595},{"type":51,"value":1572}," is used (table ignored).",{"type":46,"tag":1478,"props":1574,"children":1575},{},[1576,1585,1589],{"type":46,"tag":1505,"props":1577,"children":1578},{},[1579],{"type":46,"tag":75,"props":1580,"children":1582},{"className":1581},[],[1583],{"type":51,"value":1584},"fields",{"type":46,"tag":1505,"props":1586,"children":1587},{},[1588],{"type":51,"value":1518},{"type":46,"tag":1505,"props":1590,"children":1591},{},[1592,1594,1600],{"type":51,"value":1593},"Array of ",{"type":46,"tag":75,"props":1595,"children":1597},{"className":1596},[],[1598],{"type":51,"value":1599},"view.field_name",{"type":51,"value":1601}," references",{"type":46,"tag":1478,"props":1603,"children":1604},{},[1605,1613,1618],{"type":46,"tag":1505,"props":1606,"children":1607},{},[1608],{"type":46,"tag":75,"props":1609,"children":1611},{"className":1610},[],[1612],{"type":51,"value":1033},{"type":46,"tag":1505,"props":1614,"children":1615},{},[1616],{"type":51,"value":1617},"Recommended",{"type":46,"tag":1505,"props":1619,"children":1620},{},[1621],{"type":51,"value":1622},"Topic for join resolution",{"type":46,"tag":1478,"props":1624,"children":1625},{},[1626,1634,1639],{"type":46,"tag":1505,"props":1627,"children":1628},{},[1629],{"type":46,"tag":75,"props":1630,"children":1632},{"className":1631},[],[1633],{"type":51,"value":770},{"type":46,"tag":1505,"props":1635,"children":1636},{},[1637],{"type":51,"value":1638},"No",{"type":46,"tag":1505,"props":1640,"children":1641},{},[1642,1644,1650],{"type":51,"value":1643},"Row limit (default 1000, max 50000, ",{"type":46,"tag":75,"props":1645,"children":1647},{"className":1646},[],[1648],{"type":51,"value":1649},"null",{"type":51,"value":1651}," for unlimited)",{"type":46,"tag":1478,"props":1653,"children":1654},{},[1655,1664,1668],{"type":46,"tag":1505,"props":1656,"children":1657},{},[1658],{"type":46,"tag":75,"props":1659,"children":1661},{"className":1660},[],[1662],{"type":51,"value":1663},"sorts",{"type":46,"tag":1505,"props":1665,"children":1666},{},[1667],{"type":51,"value":1638},{"type":46,"tag":1505,"props":1669,"children":1670},{},[1671],{"type":51,"value":1672},"Array of sort objects",{"type":46,"tag":1478,"props":1674,"children":1675},{},[1676,1685,1689],{"type":46,"tag":1505,"props":1677,"children":1678},{},[1679],{"type":46,"tag":75,"props":1680,"children":1682},{"className":1681},[],[1683],{"type":51,"value":1684},"filters",{"type":46,"tag":1505,"props":1686,"children":1687},{},[1688],{"type":51,"value":1638},{"type":46,"tag":1505,"props":1690,"children":1691},{},[1692],{"type":51,"value":1693},"Filter object",{"type":46,"tag":1478,"props":1695,"children":1696},{},[1697,1706,1710],{"type":46,"tag":1505,"props":1698,"children":1699},{},[1700],{"type":46,"tag":75,"props":1701,"children":1703},{"className":1702},[],[1704],{"type":51,"value":1705},"pivots",{"type":46,"tag":1505,"props":1707,"children":1708},{},[1709],{"type":51,"value":1638},{"type":46,"tag":1505,"props":1711,"children":1712},{},[1713],{"type":51,"value":1714},"Array of field names to pivot on",{"type":46,"tag":1323,"props":1716,"children":1718},{"id":1717},"field-naming",[1719],{"type":51,"value":1720},"Field Naming",{"type":46,"tag":54,"props":1722,"children":1723},{},[1724,1726,1732],{"type":51,"value":1725},"Fields use ",{"type":46,"tag":75,"props":1727,"children":1729},{"className":1728},[],[1730],{"type":51,"value":1731},"view_name.field_name",{"type":51,"value":1733},". Date fields support timeframe brackets:",{"type":46,"tag":91,"props":1735,"children":1739},{"className":1736,"code":1738,"language":51},[1737],"language-text","users.created_at[date]      — Daily\nusers.created_at[week]      — Weekly\nusers.created_at[month]     — Monthly\nusers.created_at[quarter]   — Quarterly\nusers.created_at[year]      — Yearly\n",[1740],{"type":46,"tag":75,"props":1741,"children":1742},{"__ignoreMap":96},[1743],{"type":51,"value":1738},{"type":46,"tag":1323,"props":1745,"children":1746},{"id":1663},[1747],{"type":51,"value":1748},"Sorts",{"type":46,"tag":91,"props":1750,"children":1754},{"className":1751,"code":1752,"language":1753,"meta":96,"style":96},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"sorts\": [\n  { \"column_name\": \"order_items.total_revenue\", \"sort_descending\": true }\n]\n","json",[1755],{"type":46,"tag":75,"props":1756,"children":1757},{"__ignoreMap":96},[1758,1784,1856],{"type":46,"tag":102,"props":1759,"children":1760},{"class":104,"line":105},[1761,1766,1770,1774,1779],{"type":46,"tag":102,"props":1762,"children":1763},{"style":144},[1764],{"type":51,"value":1765},"\"",{"type":46,"tag":102,"props":1767,"children":1768},{"style":133},[1769],{"type":51,"value":1663},{"type":46,"tag":102,"props":1771,"children":1772},{"style":144},[1773],{"type":51,"value":1765},{"type":46,"tag":102,"props":1775,"children":1776},{"style":248},[1777],{"type":51,"value":1778},": ",{"type":46,"tag":102,"props":1780,"children":1781},{"style":144},[1782],{"type":51,"value":1783},"[\n",{"type":46,"tag":102,"props":1785,"children":1786},{"class":104,"line":115},[1787,1792,1796,1802,1806,1811,1815,1820,1824,1829,1833,1838,1842,1846,1851],{"type":46,"tag":102,"props":1788,"children":1789},{"style":144},[1790],{"type":51,"value":1791},"  {",{"type":46,"tag":102,"props":1793,"children":1794},{"style":144},[1795],{"type":51,"value":167},{"type":46,"tag":102,"props":1797,"children":1799},{"style":1798},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1800],{"type":51,"value":1801},"column_name",{"type":46,"tag":102,"props":1803,"children":1804},{"style":144},[1805],{"type":51,"value":1765},{"type":46,"tag":102,"props":1807,"children":1808},{"style":144},[1809],{"type":51,"value":1810},":",{"type":46,"tag":102,"props":1812,"children":1813},{"style":144},[1814],{"type":51,"value":167},{"type":46,"tag":102,"props":1816,"children":1817},{"style":133},[1818],{"type":51,"value":1819},"order_items.total_revenue",{"type":46,"tag":102,"props":1821,"children":1822},{"style":144},[1823],{"type":51,"value":1765},{"type":46,"tag":102,"props":1825,"children":1826},{"style":144},[1827],{"type":51,"value":1828},",",{"type":46,"tag":102,"props":1830,"children":1831},{"style":144},[1832],{"type":51,"value":167},{"type":46,"tag":102,"props":1834,"children":1835},{"style":1798},[1836],{"type":51,"value":1837},"sort_descending",{"type":46,"tag":102,"props":1839,"children":1840},{"style":144},[1841],{"type":51,"value":1765},{"type":46,"tag":102,"props":1843,"children":1844},{"style":144},[1845],{"type":51,"value":1810},{"type":46,"tag":102,"props":1847,"children":1848},{"style":144},[1849],{"type":51,"value":1850}," true",{"type":46,"tag":102,"props":1852,"children":1853},{"style":144},[1854],{"type":51,"value":1855}," }\n",{"type":46,"tag":102,"props":1857,"children":1858},{"class":104,"line":33},[1859],{"type":46,"tag":102,"props":1860,"children":1861},{"style":144},[1862],{"type":51,"value":1863},"]\n",{"type":46,"tag":1323,"props":1865,"children":1866},{"id":1684},[1867],{"type":51,"value":1868},"Filters",{"type":46,"tag":91,"props":1870,"children":1872},{"className":1751,"code":1871,"language":1753,"meta":96,"style":96},"\"filters\": {\n  \"order_items.created_at\": \"last 90 days\",\n  \"order_items.status\": \"complete\",\n  \"users.state\": \"California,New York\"\n}\n",[1873],{"type":46,"tag":75,"props":1874,"children":1875},{"__ignoreMap":96},[1876,1899,1938,1975,2007],{"type":46,"tag":102,"props":1877,"children":1878},{"class":104,"line":105},[1879,1883,1887,1891,1895],{"type":46,"tag":102,"props":1880,"children":1881},{"style":144},[1882],{"type":51,"value":1765},{"type":46,"tag":102,"props":1884,"children":1885},{"style":133},[1886],{"type":51,"value":1684},{"type":46,"tag":102,"props":1888,"children":1889},{"style":144},[1890],{"type":51,"value":1765},{"type":46,"tag":102,"props":1892,"children":1893},{"style":248},[1894],{"type":51,"value":1778},{"type":46,"tag":102,"props":1896,"children":1897},{"style":144},[1898],{"type":51,"value":1365},{"type":46,"tag":102,"props":1900,"children":1901},{"class":104,"line":115},[1902,1907,1912,1916,1920,1924,1929,1933],{"type":46,"tag":102,"props":1903,"children":1904},{"style":144},[1905],{"type":51,"value":1906},"  \"",{"type":46,"tag":102,"props":1908,"children":1909},{"style":1798},[1910],{"type":51,"value":1911},"order_items.created_at",{"type":46,"tag":102,"props":1913,"children":1914},{"style":144},[1915],{"type":51,"value":1765},{"type":46,"tag":102,"props":1917,"children":1918},{"style":144},[1919],{"type":51,"value":1810},{"type":46,"tag":102,"props":1921,"children":1922},{"style":144},[1923],{"type":51,"value":167},{"type":46,"tag":102,"props":1925,"children":1926},{"style":133},[1927],{"type":51,"value":1928},"last 90 days",{"type":46,"tag":102,"props":1930,"children":1931},{"style":144},[1932],{"type":51,"value":1765},{"type":46,"tag":102,"props":1934,"children":1935},{"style":144},[1936],{"type":51,"value":1937},",\n",{"type":46,"tag":102,"props":1939,"children":1940},{"class":104,"line":33},[1941,1945,1950,1954,1958,1962,1967,1971],{"type":46,"tag":102,"props":1942,"children":1943},{"style":144},[1944],{"type":51,"value":1906},{"type":46,"tag":102,"props":1946,"children":1947},{"style":1798},[1948],{"type":51,"value":1949},"order_items.status",{"type":46,"tag":102,"props":1951,"children":1952},{"style":144},[1953],{"type":51,"value":1765},{"type":46,"tag":102,"props":1955,"children":1956},{"style":144},[1957],{"type":51,"value":1810},{"type":46,"tag":102,"props":1959,"children":1960},{"style":144},[1961],{"type":51,"value":167},{"type":46,"tag":102,"props":1963,"children":1964},{"style":133},[1965],{"type":51,"value":1966},"complete",{"type":46,"tag":102,"props":1968,"children":1969},{"style":144},[1970],{"type":51,"value":1765},{"type":46,"tag":102,"props":1972,"children":1973},{"style":144},[1974],{"type":51,"value":1937},{"type":46,"tag":102,"props":1976,"children":1977},{"class":104,"line":221},[1978,1982,1986,1990,1994,1998,2003],{"type":46,"tag":102,"props":1979,"children":1980},{"style":144},[1981],{"type":51,"value":1906},{"type":46,"tag":102,"props":1983,"children":1984},{"style":1798},[1985],{"type":51,"value":1048},{"type":46,"tag":102,"props":1987,"children":1988},{"style":144},[1989],{"type":51,"value":1765},{"type":46,"tag":102,"props":1991,"children":1992},{"style":144},[1993],{"type":51,"value":1810},{"type":46,"tag":102,"props":1995,"children":1996},{"style":144},[1997],{"type":51,"value":167},{"type":46,"tag":102,"props":1999,"children":2000},{"style":133},[2001],{"type":51,"value":2002},"California,New York",{"type":46,"tag":102,"props":2004,"children":2005},{"style":144},[2006],{"type":51,"value":177},{"type":46,"tag":102,"props":2008,"children":2009},{"class":104,"line":259},[2010],{"type":46,"tag":102,"props":2011,"children":2012},{"style":144},[2013],{"type":51,"value":2014},"}\n",{"type":46,"tag":54,"props":2016,"children":2017},{},[2018,2020,2026,2027,2033,2034,2040,2041,2047,2048,2054,2055,2061,2062,2068,2069,2075,2076,2082,2083,2089,2091,2097],{"type":51,"value":2019},"Expressions: ",{"type":46,"tag":75,"props":2021,"children":2023},{"className":2022},[],[2024],{"type":51,"value":2025},"\"last 90 days\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2028,"children":2030},{"className":2029},[],[2031],{"type":51,"value":2032},"\"this quarter\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2035,"children":2037},{"className":2036},[],[2038],{"type":51,"value":2039},"\"2024-01-01 to 2024-12-31\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2042,"children":2044},{"className":2043},[],[2045],{"type":51,"value":2046},"\"not California\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2049,"children":2051},{"className":2050},[],[2052],{"type":51,"value":2053},"\"null\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2056,"children":2058},{"className":2057},[],[2059],{"type":51,"value":2060},"\"not null\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2063,"children":2065},{"className":2064},[],[2066],{"type":51,"value":2067},"\">100\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2070,"children":2072},{"className":2071},[],[2073],{"type":51,"value":2074},"\"between 10 and 100\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2077,"children":2079},{"className":2078},[],[2080],{"type":51,"value":2081},"\"contains sales\"",{"type":51,"value":616},{"type":46,"tag":75,"props":2084,"children":2086},{"className":2085},[],[2087],{"type":51,"value":2088},"\"starts with A\"",{"type":51,"value":2090},". See ",{"type":46,"tag":2092,"props":2093,"children":2095},"a",{"href":2094},"references\u002Ffilter-expressions.md",[2096],{"type":51,"value":2094},{"type":51,"value":2098}," for the complete expression syntax reference.",{"type":46,"tag":54,"props":2100,"children":2101},{},[2102,2104,2110],{"type":51,"value":2103},"If a date filter string fails with an API error like ",{"type":46,"tag":75,"props":2105,"children":2107},{"className":2106},[],[2108],{"type":51,"value":2109},"Cannot use 'in' operator to search for 'query_id' in last 12 months",{"type":51,"value":2111},", keep the query semantic and retry\nwith the typed date-filter object shape instead of dropping the filter:",{"type":46,"tag":91,"props":2113,"children":2115},{"className":1751,"code":2114,"language":1753,"meta":96,"style":96},"\"filters\": {\n  \"order_items.created_at\": {\n    \"type\": \"date\",\n    \"kind\": \"TIME_FOR_INTERVAL_DURATION\",\n    \"left_side\": \"12 months ago\",\n    \"right_side\": \"12 months\",\n    \"ui_type\": \"PAST\"\n  }\n}\n",[2116],{"type":46,"tag":75,"props":2117,"children":2118},{"__ignoreMap":96},[2119,2142,2166,2204,2241,2278,2315,2348,2355],{"type":46,"tag":102,"props":2120,"children":2121},{"class":104,"line":105},[2122,2126,2130,2134,2138],{"type":46,"tag":102,"props":2123,"children":2124},{"style":144},[2125],{"type":51,"value":1765},{"type":46,"tag":102,"props":2127,"children":2128},{"style":133},[2129],{"type":51,"value":1684},{"type":46,"tag":102,"props":2131,"children":2132},{"style":144},[2133],{"type":51,"value":1765},{"type":46,"tag":102,"props":2135,"children":2136},{"style":248},[2137],{"type":51,"value":1778},{"type":46,"tag":102,"props":2139,"children":2140},{"style":144},[2141],{"type":51,"value":1365},{"type":46,"tag":102,"props":2143,"children":2144},{"class":104,"line":115},[2145,2149,2153,2157,2161],{"type":46,"tag":102,"props":2146,"children":2147},{"style":144},[2148],{"type":51,"value":1906},{"type":46,"tag":102,"props":2150,"children":2151},{"style":1798},[2152],{"type":51,"value":1911},{"type":46,"tag":102,"props":2154,"children":2155},{"style":144},[2156],{"type":51,"value":1765},{"type":46,"tag":102,"props":2158,"children":2159},{"style":144},[2160],{"type":51,"value":1810},{"type":46,"tag":102,"props":2162,"children":2163},{"style":144},[2164],{"type":51,"value":2165}," {\n",{"type":46,"tag":102,"props":2167,"children":2168},{"class":104,"line":33},[2169,2174,2179,2183,2187,2191,2196,2200],{"type":46,"tag":102,"props":2170,"children":2171},{"style":144},[2172],{"type":51,"value":2173},"    \"",{"type":46,"tag":102,"props":2175,"children":2176},{"style":198},[2177],{"type":51,"value":2178},"type",{"type":46,"tag":102,"props":2180,"children":2181},{"style":144},[2182],{"type":51,"value":1765},{"type":46,"tag":102,"props":2184,"children":2185},{"style":144},[2186],{"type":51,"value":1810},{"type":46,"tag":102,"props":2188,"children":2189},{"style":144},[2190],{"type":51,"value":167},{"type":46,"tag":102,"props":2192,"children":2193},{"style":133},[2194],{"type":51,"value":2195},"date",{"type":46,"tag":102,"props":2197,"children":2198},{"style":144},[2199],{"type":51,"value":1765},{"type":46,"tag":102,"props":2201,"children":2202},{"style":144},[2203],{"type":51,"value":1937},{"type":46,"tag":102,"props":2205,"children":2206},{"class":104,"line":221},[2207,2211,2216,2220,2224,2228,2233,2237],{"type":46,"tag":102,"props":2208,"children":2209},{"style":144},[2210],{"type":51,"value":2173},{"type":46,"tag":102,"props":2212,"children":2213},{"style":198},[2214],{"type":51,"value":2215},"kind",{"type":46,"tag":102,"props":2217,"children":2218},{"style":144},[2219],{"type":51,"value":1765},{"type":46,"tag":102,"props":2221,"children":2222},{"style":144},[2223],{"type":51,"value":1810},{"type":46,"tag":102,"props":2225,"children":2226},{"style":144},[2227],{"type":51,"value":167},{"type":46,"tag":102,"props":2229,"children":2230},{"style":133},[2231],{"type":51,"value":2232},"TIME_FOR_INTERVAL_DURATION",{"type":46,"tag":102,"props":2234,"children":2235},{"style":144},[2236],{"type":51,"value":1765},{"type":46,"tag":102,"props":2238,"children":2239},{"style":144},[2240],{"type":51,"value":1937},{"type":46,"tag":102,"props":2242,"children":2243},{"class":104,"line":259},[2244,2248,2253,2257,2261,2265,2270,2274],{"type":46,"tag":102,"props":2245,"children":2246},{"style":144},[2247],{"type":51,"value":2173},{"type":46,"tag":102,"props":2249,"children":2250},{"style":198},[2251],{"type":51,"value":2252},"left_side",{"type":46,"tag":102,"props":2254,"children":2255},{"style":144},[2256],{"type":51,"value":1765},{"type":46,"tag":102,"props":2258,"children":2259},{"style":144},[2260],{"type":51,"value":1810},{"type":46,"tag":102,"props":2262,"children":2263},{"style":144},[2264],{"type":51,"value":167},{"type":46,"tag":102,"props":2266,"children":2267},{"style":133},[2268],{"type":51,"value":2269},"12 months ago",{"type":46,"tag":102,"props":2271,"children":2272},{"style":144},[2273],{"type":51,"value":1765},{"type":46,"tag":102,"props":2275,"children":2276},{"style":144},[2277],{"type":51,"value":1937},{"type":46,"tag":102,"props":2279,"children":2280},{"class":104,"line":269},[2281,2285,2290,2294,2298,2302,2307,2311],{"type":46,"tag":102,"props":2282,"children":2283},{"style":144},[2284],{"type":51,"value":2173},{"type":46,"tag":102,"props":2286,"children":2287},{"style":198},[2288],{"type":51,"value":2289},"right_side",{"type":46,"tag":102,"props":2291,"children":2292},{"style":144},[2293],{"type":51,"value":1765},{"type":46,"tag":102,"props":2295,"children":2296},{"style":144},[2297],{"type":51,"value":1810},{"type":46,"tag":102,"props":2299,"children":2300},{"style":144},[2301],{"type":51,"value":167},{"type":46,"tag":102,"props":2303,"children":2304},{"style":133},[2305],{"type":51,"value":2306},"12 months",{"type":46,"tag":102,"props":2308,"children":2309},{"style":144},[2310],{"type":51,"value":1765},{"type":46,"tag":102,"props":2312,"children":2313},{"style":144},[2314],{"type":51,"value":1937},{"type":46,"tag":102,"props":2316,"children":2317},{"class":104,"line":278},[2318,2322,2327,2331,2335,2339,2344],{"type":46,"tag":102,"props":2319,"children":2320},{"style":144},[2321],{"type":51,"value":2173},{"type":46,"tag":102,"props":2323,"children":2324},{"style":198},[2325],{"type":51,"value":2326},"ui_type",{"type":46,"tag":102,"props":2328,"children":2329},{"style":144},[2330],{"type":51,"value":1765},{"type":46,"tag":102,"props":2332,"children":2333},{"style":144},[2334],{"type":51,"value":1810},{"type":46,"tag":102,"props":2336,"children":2337},{"style":144},[2338],{"type":51,"value":167},{"type":46,"tag":102,"props":2340,"children":2341},{"style":133},[2342],{"type":51,"value":2343},"PAST",{"type":46,"tag":102,"props":2345,"children":2346},{"style":144},[2347],{"type":51,"value":177},{"type":46,"tag":102,"props":2349,"children":2350},{"class":104,"line":1416},[2351],{"type":46,"tag":102,"props":2352,"children":2353},{"style":144},[2354],{"type":51,"value":1449},{"type":46,"tag":102,"props":2356,"children":2357},{"class":104,"line":1425},[2358],{"type":46,"tag":102,"props":2359,"children":2360},{"style":144},[2361],{"type":51,"value":2014},{"type":46,"tag":1323,"props":2363,"children":2364},{"id":1705},[2365],{"type":51,"value":2366},"Pivots",{"type":46,"tag":91,"props":2368,"children":2370},{"className":1751,"code":2369,"language":1753,"meta":96,"style":96},"{\n  \"query\": {\n    \"fields\": [\"order_items.created_at[month]\", \"order_items.status\", \"order_items.count\"],\n    \"pivots\": [\"order_items.status\"],\n    \"join_paths_from_topic_name\": \"order_items\"\n  }\n}\n",[2371],{"type":46,"tag":75,"props":2372,"children":2373},{"__ignoreMap":96},[2374,2381,2405,2480,2519,2550,2557],{"type":46,"tag":102,"props":2375,"children":2376},{"class":104,"line":105},[2377],{"type":46,"tag":102,"props":2378,"children":2379},{"style":144},[2380],{"type":51,"value":1365},{"type":46,"tag":102,"props":2382,"children":2383},{"class":104,"line":115},[2384,2388,2393,2397,2401],{"type":46,"tag":102,"props":2385,"children":2386},{"style":144},[2387],{"type":51,"value":1906},{"type":46,"tag":102,"props":2389,"children":2390},{"style":1798},[2391],{"type":51,"value":2392},"query",{"type":46,"tag":102,"props":2394,"children":2395},{"style":144},[2396],{"type":51,"value":1765},{"type":46,"tag":102,"props":2398,"children":2399},{"style":144},[2400],{"type":51,"value":1810},{"type":46,"tag":102,"props":2402,"children":2403},{"style":144},[2404],{"type":51,"value":2165},{"type":46,"tag":102,"props":2406,"children":2407},{"class":104,"line":33},[2408,2412,2416,2420,2424,2429,2433,2438,2442,2446,2450,2454,2458,2462,2466,2471,2475],{"type":46,"tag":102,"props":2409,"children":2410},{"style":144},[2411],{"type":51,"value":2173},{"type":46,"tag":102,"props":2413,"children":2414},{"style":198},[2415],{"type":51,"value":1584},{"type":46,"tag":102,"props":2417,"children":2418},{"style":144},[2419],{"type":51,"value":1765},{"type":46,"tag":102,"props":2421,"children":2422},{"style":144},[2423],{"type":51,"value":1810},{"type":46,"tag":102,"props":2425,"children":2426},{"style":144},[2427],{"type":51,"value":2428}," [",{"type":46,"tag":102,"props":2430,"children":2431},{"style":144},[2432],{"type":51,"value":1765},{"type":46,"tag":102,"props":2434,"children":2435},{"style":133},[2436],{"type":51,"value":2437},"order_items.created_at[month]",{"type":46,"tag":102,"props":2439,"children":2440},{"style":144},[2441],{"type":51,"value":1765},{"type":46,"tag":102,"props":2443,"children":2444},{"style":144},[2445],{"type":51,"value":1828},{"type":46,"tag":102,"props":2447,"children":2448},{"style":144},[2449],{"type":51,"value":167},{"type":46,"tag":102,"props":2451,"children":2452},{"style":133},[2453],{"type":51,"value":1949},{"type":46,"tag":102,"props":2455,"children":2456},{"style":144},[2457],{"type":51,"value":1765},{"type":46,"tag":102,"props":2459,"children":2460},{"style":144},[2461],{"type":51,"value":1828},{"type":46,"tag":102,"props":2463,"children":2464},{"style":144},[2465],{"type":51,"value":167},{"type":46,"tag":102,"props":2467,"children":2468},{"style":133},[2469],{"type":51,"value":2470},"order_items.count",{"type":46,"tag":102,"props":2472,"children":2473},{"style":144},[2474],{"type":51,"value":1765},{"type":46,"tag":102,"props":2476,"children":2477},{"style":144},[2478],{"type":51,"value":2479},"],\n",{"type":46,"tag":102,"props":2481,"children":2482},{"class":104,"line":221},[2483,2487,2491,2495,2499,2503,2507,2511,2515],{"type":46,"tag":102,"props":2484,"children":2485},{"style":144},[2486],{"type":51,"value":2173},{"type":46,"tag":102,"props":2488,"children":2489},{"style":198},[2490],{"type":51,"value":1705},{"type":46,"tag":102,"props":2492,"children":2493},{"style":144},[2494],{"type":51,"value":1765},{"type":46,"tag":102,"props":2496,"children":2497},{"style":144},[2498],{"type":51,"value":1810},{"type":46,"tag":102,"props":2500,"children":2501},{"style":144},[2502],{"type":51,"value":2428},{"type":46,"tag":102,"props":2504,"children":2505},{"style":144},[2506],{"type":51,"value":1765},{"type":46,"tag":102,"props":2508,"children":2509},{"style":133},[2510],{"type":51,"value":1949},{"type":46,"tag":102,"props":2512,"children":2513},{"style":144},[2514],{"type":51,"value":1765},{"type":46,"tag":102,"props":2516,"children":2517},{"style":144},[2518],{"type":51,"value":2479},{"type":46,"tag":102,"props":2520,"children":2521},{"class":104,"line":259},[2522,2526,2530,2534,2538,2542,2546],{"type":46,"tag":102,"props":2523,"children":2524},{"style":144},[2525],{"type":51,"value":2173},{"type":46,"tag":102,"props":2527,"children":2528},{"style":198},[2529],{"type":51,"value":1033},{"type":46,"tag":102,"props":2531,"children":2532},{"style":144},[2533],{"type":51,"value":1765},{"type":46,"tag":102,"props":2535,"children":2536},{"style":144},[2537],{"type":51,"value":1810},{"type":46,"tag":102,"props":2539,"children":2540},{"style":144},[2541],{"type":51,"value":167},{"type":46,"tag":102,"props":2543,"children":2544},{"style":133},[2545],{"type":51,"value":1056},{"type":46,"tag":102,"props":2547,"children":2548},{"style":144},[2549],{"type":51,"value":177},{"type":46,"tag":102,"props":2551,"children":2552},{"class":104,"line":269},[2553],{"type":46,"tag":102,"props":2554,"children":2555},{"style":144},[2556],{"type":51,"value":1449},{"type":46,"tag":102,"props":2558,"children":2559},{"class":104,"line":278},[2560],{"type":46,"tag":102,"props":2561,"children":2562},{"style":144},[2563],{"type":51,"value":2014},{"type":46,"tag":54,"props":2565,"children":2566},{},[2567,2578,2580,2586,2588,2593],{"type":46,"tag":67,"props":2568,"children":2569},{},[2570,2572],{"type":51,"value":2571},"Pivoted queries reject ",{"type":46,"tag":75,"props":2573,"children":2575},{"className":2574},[],[2576],{"type":51,"value":2577},"limit: null",{"type":51,"value":2579}," — pass an explicit numeric limit (e.g., ",{"type":46,"tag":75,"props":2581,"children":2583},{"className":2582},[],[2584],{"type":51,"value":2585},"5000",{"type":51,"value":2587},"). Unlimited is only allowed when ",{"type":46,"tag":75,"props":2589,"children":2591},{"className":2590},[],[2592],{"type":51,"value":762},{"type":51,"value":2594}," is empty.",{"type":46,"tag":1323,"props":2596,"children":2598},{"id":2597},"transpose-measures-into-rows-transposed_measures",[2599,2601,2607],{"type":51,"value":2600},"Transpose measures into rows (",{"type":46,"tag":75,"props":2602,"children":2604},{"className":2603},[],[2605],{"type":51,"value":2606},"transposed_measures",{"type":51,"value":2608},")",{"type":46,"tag":54,"props":2610,"children":2611},{},[2612,2614,2619,2621,2626,2628,2633,2635,2640,2642,2647,2649,2654,2656,2662,2664,2670],{"type":51,"value":2613},"Folds several ",{"type":46,"tag":67,"props":2615,"children":2616},{},[2617],{"type":51,"value":2618},"measures",{"type":51,"value":2620}," from one wide row into ",{"type":46,"tag":67,"props":2622,"children":2623},{},[2624],{"type":51,"value":2625},"long form",{"type":51,"value":2627}," — one row per measure — so the measures become a category you can chart against (e.g. a funnel, or a \"measures on the axis\" bar). ",{"type":46,"tag":75,"props":2629,"children":2631},{"className":2630},[],[2632],{"type":51,"value":2606},{"type":51,"value":2634}," is an ",{"type":46,"tag":67,"props":2636,"children":2637},{},[2638],{"type":51,"value":2639},"array of the measure field names",{"type":51,"value":2641}," to fold (the same names you put in ",{"type":46,"tag":75,"props":2643,"children":2645},{"className":2644},[],[2646],{"type":51,"value":1584},{"type":51,"value":2648},"), ",{"type":46,"tag":67,"props":2650,"children":2651},{},[2652],{"type":51,"value":2653},"not a boolean",{"type":51,"value":2655}," — passing ",{"type":46,"tag":75,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":51,"value":2661},"true",{"type":51,"value":2663}," is silently rejected (",{"type":46,"tag":75,"props":2665,"children":2667},{"className":2666},[],[2668],{"type":51,"value":2669},"z.array(z.string())",{"type":51,"value":2671},"), yielding an empty result.",{"type":46,"tag":91,"props":2673,"children":2675},{"className":1751,"code":2674,"language":1753,"meta":96,"style":96},"{\n  \"query\": {\n    \"table\": \"order_items\",\n    \"fields\": [\"order_items.units_sold\", \"order_items.shipped_items\", \"order_items.delivered_items\"],\n    \"transposed_measures\": [\"order_items.units_sold\", \"order_items.shipped_items\", \"order_items.delivered_items\"],\n    \"join_paths_from_topic_name\": \"order_items\"\n  }\n}\n",[2676],{"type":46,"tag":75,"props":2677,"children":2678},{"__ignoreMap":96},[2679,2686,2709,2744,2818,2889,2920,2927],{"type":46,"tag":102,"props":2680,"children":2681},{"class":104,"line":105},[2682],{"type":46,"tag":102,"props":2683,"children":2684},{"style":144},[2685],{"type":51,"value":1365},{"type":46,"tag":102,"props":2687,"children":2688},{"class":104,"line":115},[2689,2693,2697,2701,2705],{"type":46,"tag":102,"props":2690,"children":2691},{"style":144},[2692],{"type":51,"value":1906},{"type":46,"tag":102,"props":2694,"children":2695},{"style":1798},[2696],{"type":51,"value":2392},{"type":46,"tag":102,"props":2698,"children":2699},{"style":144},[2700],{"type":51,"value":1765},{"type":46,"tag":102,"props":2702,"children":2703},{"style":144},[2704],{"type":51,"value":1810},{"type":46,"tag":102,"props":2706,"children":2707},{"style":144},[2708],{"type":51,"value":2165},{"type":46,"tag":102,"props":2710,"children":2711},{"class":104,"line":33},[2712,2716,2720,2724,2728,2732,2736,2740],{"type":46,"tag":102,"props":2713,"children":2714},{"style":144},[2715],{"type":51,"value":2173},{"type":46,"tag":102,"props":2717,"children":2718},{"style":198},[2719],{"type":51,"value":996},{"type":46,"tag":102,"props":2721,"children":2722},{"style":144},[2723],{"type":51,"value":1765},{"type":46,"tag":102,"props":2725,"children":2726},{"style":144},[2727],{"type":51,"value":1810},{"type":46,"tag":102,"props":2729,"children":2730},{"style":144},[2731],{"type":51,"value":167},{"type":46,"tag":102,"props":2733,"children":2734},{"style":133},[2735],{"type":51,"value":1056},{"type":46,"tag":102,"props":2737,"children":2738},{"style":144},[2739],{"type":51,"value":1765},{"type":46,"tag":102,"props":2741,"children":2742},{"style":144},[2743],{"type":51,"value":1937},{"type":46,"tag":102,"props":2745,"children":2746},{"class":104,"line":221},[2747,2751,2755,2759,2763,2767,2771,2776,2780,2784,2788,2793,2797,2801,2805,2810,2814],{"type":46,"tag":102,"props":2748,"children":2749},{"style":144},[2750],{"type":51,"value":2173},{"type":46,"tag":102,"props":2752,"children":2753},{"style":198},[2754],{"type":51,"value":1584},{"type":46,"tag":102,"props":2756,"children":2757},{"style":144},[2758],{"type":51,"value":1765},{"type":46,"tag":102,"props":2760,"children":2761},{"style":144},[2762],{"type":51,"value":1810},{"type":46,"tag":102,"props":2764,"children":2765},{"style":144},[2766],{"type":51,"value":2428},{"type":46,"tag":102,"props":2768,"children":2769},{"style":144},[2770],{"type":51,"value":1765},{"type":46,"tag":102,"props":2772,"children":2773},{"style":133},[2774],{"type":51,"value":2775},"order_items.units_sold",{"type":46,"tag":102,"props":2777,"children":2778},{"style":144},[2779],{"type":51,"value":1765},{"type":46,"tag":102,"props":2781,"children":2782},{"style":144},[2783],{"type":51,"value":1828},{"type":46,"tag":102,"props":2785,"children":2786},{"style":144},[2787],{"type":51,"value":167},{"type":46,"tag":102,"props":2789,"children":2790},{"style":133},[2791],{"type":51,"value":2792},"order_items.shipped_items",{"type":46,"tag":102,"props":2794,"children":2795},{"style":144},[2796],{"type":51,"value":1765},{"type":46,"tag":102,"props":2798,"children":2799},{"style":144},[2800],{"type":51,"value":1828},{"type":46,"tag":102,"props":2802,"children":2803},{"style":144},[2804],{"type":51,"value":167},{"type":46,"tag":102,"props":2806,"children":2807},{"style":133},[2808],{"type":51,"value":2809},"order_items.delivered_items",{"type":46,"tag":102,"props":2811,"children":2812},{"style":144},[2813],{"type":51,"value":1765},{"type":46,"tag":102,"props":2815,"children":2816},{"style":144},[2817],{"type":51,"value":2479},{"type":46,"tag":102,"props":2819,"children":2820},{"class":104,"line":259},[2821,2825,2829,2833,2837,2841,2845,2849,2853,2857,2861,2865,2869,2873,2877,2881,2885],{"type":46,"tag":102,"props":2822,"children":2823},{"style":144},[2824],{"type":51,"value":2173},{"type":46,"tag":102,"props":2826,"children":2827},{"style":198},[2828],{"type":51,"value":2606},{"type":46,"tag":102,"props":2830,"children":2831},{"style":144},[2832],{"type":51,"value":1765},{"type":46,"tag":102,"props":2834,"children":2835},{"style":144},[2836],{"type":51,"value":1810},{"type":46,"tag":102,"props":2838,"children":2839},{"style":144},[2840],{"type":51,"value":2428},{"type":46,"tag":102,"props":2842,"children":2843},{"style":144},[2844],{"type":51,"value":1765},{"type":46,"tag":102,"props":2846,"children":2847},{"style":133},[2848],{"type":51,"value":2775},{"type":46,"tag":102,"props":2850,"children":2851},{"style":144},[2852],{"type":51,"value":1765},{"type":46,"tag":102,"props":2854,"children":2855},{"style":144},[2856],{"type":51,"value":1828},{"type":46,"tag":102,"props":2858,"children":2859},{"style":144},[2860],{"type":51,"value":167},{"type":46,"tag":102,"props":2862,"children":2863},{"style":133},[2864],{"type":51,"value":2792},{"type":46,"tag":102,"props":2866,"children":2867},{"style":144},[2868],{"type":51,"value":1765},{"type":46,"tag":102,"props":2870,"children":2871},{"style":144},[2872],{"type":51,"value":1828},{"type":46,"tag":102,"props":2874,"children":2875},{"style":144},[2876],{"type":51,"value":167},{"type":46,"tag":102,"props":2878,"children":2879},{"style":133},[2880],{"type":51,"value":2809},{"type":46,"tag":102,"props":2882,"children":2883},{"style":144},[2884],{"type":51,"value":1765},{"type":46,"tag":102,"props":2886,"children":2887},{"style":144},[2888],{"type":51,"value":2479},{"type":46,"tag":102,"props":2890,"children":2891},{"class":104,"line":269},[2892,2896,2900,2904,2908,2912,2916],{"type":46,"tag":102,"props":2893,"children":2894},{"style":144},[2895],{"type":51,"value":2173},{"type":46,"tag":102,"props":2897,"children":2898},{"style":198},[2899],{"type":51,"value":1033},{"type":46,"tag":102,"props":2901,"children":2902},{"style":144},[2903],{"type":51,"value":1765},{"type":46,"tag":102,"props":2905,"children":2906},{"style":144},[2907],{"type":51,"value":1810},{"type":46,"tag":102,"props":2909,"children":2910},{"style":144},[2911],{"type":51,"value":167},{"type":46,"tag":102,"props":2913,"children":2914},{"style":133},[2915],{"type":51,"value":1056},{"type":46,"tag":102,"props":2917,"children":2918},{"style":144},[2919],{"type":51,"value":177},{"type":46,"tag":102,"props":2921,"children":2922},{"class":104,"line":278},[2923],{"type":46,"tag":102,"props":2924,"children":2925},{"style":144},[2926],{"type":51,"value":1449},{"type":46,"tag":102,"props":2928,"children":2929},{"class":104,"line":1416},[2930],{"type":46,"tag":102,"props":2931,"children":2932},{"style":144},[2933],{"type":51,"value":2014},{"type":46,"tag":54,"props":2935,"children":2936},{},[2937],{"type":51,"value":2938},"The result gains three synthetic columns at the first transposed measure's position:",{"type":46,"tag":553,"props":2940,"children":2941},{},[2942,2963,2985],{"type":46,"tag":557,"props":2943,"children":2944},{},[2945,2954,2956,2961],{"type":46,"tag":67,"props":2946,"children":2947},{},[2948],{"type":46,"tag":75,"props":2949,"children":2951},{"className":2950},[],[2952],{"type":51,"value":2953},"measure_name",{"type":51,"value":2955}," — the measure's field name; ",{"type":46,"tag":67,"props":2957,"children":2958},{},[2959],{"type":51,"value":2960},"renders as the measure's friendly label",{"type":51,"value":2962}," in a viz (e.g. \"Units Sold\").",{"type":46,"tag":557,"props":2964,"children":2965},{},[2966,2975,2977,2983],{"type":46,"tag":67,"props":2967,"children":2968},{},[2969],{"type":46,"tag":75,"props":2970,"children":2972},{"className":2971},[],[2973],{"type":51,"value":2974},"measure_order",{"type":51,"value":2976}," — ",{"type":46,"tag":75,"props":2978,"children":2980},{"className":2979},[],[2981],{"type":51,"value":2982},"0, 1, 2, …",{"type":51,"value":2984}," in the order listed (the stage order).",{"type":46,"tag":557,"props":2986,"children":2987},{},[2988,2997],{"type":46,"tag":67,"props":2989,"children":2990},{},[2991],{"type":46,"tag":75,"props":2992,"children":2994},{"className":2993},[],[2995],{"type":51,"value":2996},"measure_value",{"type":51,"value":2998}," — that measure's value for the row.",{"type":46,"tag":54,"props":3000,"children":3001},{},[3002,3004,3009,3011,3016,3018,3023,3025,3030,3032,3037,3039,3044],{"type":51,"value":3003},"This is the supported way to build a ",{"type":46,"tag":67,"props":3005,"children":3006},{},[3007],{"type":51,"value":3008},"funnel from multiple measures",{"type":51,"value":3010}," (Omni's funnel needs a stage ",{"type":46,"tag":353,"props":3012,"children":3013},{},[3014],{"type":51,"value":3015},"dimension",{"type":51,"value":3017}," + one measure, not N measures): chart ",{"type":46,"tag":75,"props":3019,"children":3021},{"className":3020},[],[3022],{"type":51,"value":2953},{"type":51,"value":3024}," as the stage and ",{"type":46,"tag":75,"props":3026,"children":3028},{"className":3027},[],[3029],{"type":51,"value":2996},{"type":51,"value":3031}," as the value. See ",{"type":46,"tag":75,"props":3033,"children":3035},{"className":3034},[],[3036],{"type":51,"value":1130},{"type":51,"value":3038}," → ",{"type":46,"tag":353,"props":3040,"children":3041},{},[3042],{"type":51,"value":3043},"Config Object: Funnel",{"type":51,"value":386},{"type":46,"tag":1323,"props":3046,"children":3048},{"id":3047},"table-calculations",[3049],{"type":51,"value":3050},"Table Calculations",{"type":46,"tag":54,"props":3052,"children":3053},{},[3054,3056,3061,3063,3067,3069,3075],{"type":51,"value":3055},"Post-query computed columns (running totals, % of total, ratios, conditionals). Authored as AST objects in ",{"type":46,"tag":75,"props":3057,"children":3059},{"className":3058},[],[3060],{"type":51,"value":678},{"type":51,"value":3062},". The query API requires the parsed AST — it does ",{"type":46,"tag":67,"props":3064,"children":3065},{},[3066],{"type":51,"value":1077},{"type":51,"value":3068}," accept the workbook-frontend ",{"type":46,"tag":75,"props":3070,"children":3072},{"className":3071},[],[3073],{"type":51,"value":3074},"{name, formula}",{"type":51,"value":3076}," shape.",{"type":46,"tag":54,"props":3078,"children":3079},{},[3080],{"type":51,"value":3081},"Minimum-viable calc:",{"type":46,"tag":91,"props":3083,"children":3085},{"className":1751,"code":3084,"language":1753,"meta":96,"style":96},"{\n  \"query\": {\n    \"fields\": [\"orders.month\", \"orders.total_revenue\", \"calc_pct\"],\n    \"calculations\": [{\n      \"calc_name\": \"calc_pct\",\n      \"label\": \"% of Total\",\n      \"format\": \"0.0%\",\n      \"sql_expression\": {\n        \"type\": \"call\",\n        \"operator\": \"Omni.OMNI_PERCENT_OF_TOTAL\",\n        \"operands\": [\n          { \"type\": \"field\", \"field_name\": \"orders.total_revenue\", \"for_calc\": true }\n        ]\n      }\n    }]\n  }\n}\n",[3086],{"type":46,"tag":75,"props":3087,"children":3088},{"__ignoreMap":96},[3089,3096,3119,3193,3218,3255,3292,3329,3353,3391,3428,3453,3552,3561,3570,3579,3587],{"type":46,"tag":102,"props":3090,"children":3091},{"class":104,"line":105},[3092],{"type":46,"tag":102,"props":3093,"children":3094},{"style":144},[3095],{"type":51,"value":1365},{"type":46,"tag":102,"props":3097,"children":3098},{"class":104,"line":115},[3099,3103,3107,3111,3115],{"type":46,"tag":102,"props":3100,"children":3101},{"style":144},[3102],{"type":51,"value":1906},{"type":46,"tag":102,"props":3104,"children":3105},{"style":1798},[3106],{"type":51,"value":2392},{"type":46,"tag":102,"props":3108,"children":3109},{"style":144},[3110],{"type":51,"value":1765},{"type":46,"tag":102,"props":3112,"children":3113},{"style":144},[3114],{"type":51,"value":1810},{"type":46,"tag":102,"props":3116,"children":3117},{"style":144},[3118],{"type":51,"value":2165},{"type":46,"tag":102,"props":3120,"children":3121},{"class":104,"line":33},[3122,3126,3130,3134,3138,3142,3146,3151,3155,3159,3163,3168,3172,3176,3180,3185,3189],{"type":46,"tag":102,"props":3123,"children":3124},{"style":144},[3125],{"type":51,"value":2173},{"type":46,"tag":102,"props":3127,"children":3128},{"style":198},[3129],{"type":51,"value":1584},{"type":46,"tag":102,"props":3131,"children":3132},{"style":144},[3133],{"type":51,"value":1765},{"type":46,"tag":102,"props":3135,"children":3136},{"style":144},[3137],{"type":51,"value":1810},{"type":46,"tag":102,"props":3139,"children":3140},{"style":144},[3141],{"type":51,"value":2428},{"type":46,"tag":102,"props":3143,"children":3144},{"style":144},[3145],{"type":51,"value":1765},{"type":46,"tag":102,"props":3147,"children":3148},{"style":133},[3149],{"type":51,"value":3150},"orders.month",{"type":46,"tag":102,"props":3152,"children":3153},{"style":144},[3154],{"type":51,"value":1765},{"type":46,"tag":102,"props":3156,"children":3157},{"style":144},[3158],{"type":51,"value":1828},{"type":46,"tag":102,"props":3160,"children":3161},{"style":144},[3162],{"type":51,"value":167},{"type":46,"tag":102,"props":3164,"children":3165},{"style":133},[3166],{"type":51,"value":3167},"orders.total_revenue",{"type":46,"tag":102,"props":3169,"children":3170},{"style":144},[3171],{"type":51,"value":1765},{"type":46,"tag":102,"props":3173,"children":3174},{"style":144},[3175],{"type":51,"value":1828},{"type":46,"tag":102,"props":3177,"children":3178},{"style":144},[3179],{"type":51,"value":167},{"type":46,"tag":102,"props":3181,"children":3182},{"style":133},[3183],{"type":51,"value":3184},"calc_pct",{"type":46,"tag":102,"props":3186,"children":3187},{"style":144},[3188],{"type":51,"value":1765},{"type":46,"tag":102,"props":3190,"children":3191},{"style":144},[3192],{"type":51,"value":2479},{"type":46,"tag":102,"props":3194,"children":3195},{"class":104,"line":221},[3196,3200,3205,3209,3213],{"type":46,"tag":102,"props":3197,"children":3198},{"style":144},[3199],{"type":51,"value":2173},{"type":46,"tag":102,"props":3201,"children":3202},{"style":198},[3203],{"type":51,"value":3204},"calculations",{"type":46,"tag":102,"props":3206,"children":3207},{"style":144},[3208],{"type":51,"value":1765},{"type":46,"tag":102,"props":3210,"children":3211},{"style":144},[3212],{"type":51,"value":1810},{"type":46,"tag":102,"props":3214,"children":3215},{"style":144},[3216],{"type":51,"value":3217}," [{\n",{"type":46,"tag":102,"props":3219,"children":3220},{"class":104,"line":259},[3221,3226,3231,3235,3239,3243,3247,3251],{"type":46,"tag":102,"props":3222,"children":3223},{"style":144},[3224],{"type":51,"value":3225},"      \"",{"type":46,"tag":102,"props":3227,"children":3229},{"style":3228},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[3230],{"type":51,"value":711},{"type":46,"tag":102,"props":3232,"children":3233},{"style":144},[3234],{"type":51,"value":1765},{"type":46,"tag":102,"props":3236,"children":3237},{"style":144},[3238],{"type":51,"value":1810},{"type":46,"tag":102,"props":3240,"children":3241},{"style":144},[3242],{"type":51,"value":167},{"type":46,"tag":102,"props":3244,"children":3245},{"style":133},[3246],{"type":51,"value":3184},{"type":46,"tag":102,"props":3248,"children":3249},{"style":144},[3250],{"type":51,"value":1765},{"type":46,"tag":102,"props":3252,"children":3253},{"style":144},[3254],{"type":51,"value":1937},{"type":46,"tag":102,"props":3256,"children":3257},{"class":104,"line":269},[3258,3262,3267,3271,3275,3279,3284,3288],{"type":46,"tag":102,"props":3259,"children":3260},{"style":144},[3261],{"type":51,"value":3225},{"type":46,"tag":102,"props":3263,"children":3264},{"style":3228},[3265],{"type":51,"value":3266},"label",{"type":46,"tag":102,"props":3268,"children":3269},{"style":144},[3270],{"type":51,"value":1765},{"type":46,"tag":102,"props":3272,"children":3273},{"style":144},[3274],{"type":51,"value":1810},{"type":46,"tag":102,"props":3276,"children":3277},{"style":144},[3278],{"type":51,"value":167},{"type":46,"tag":102,"props":3280,"children":3281},{"style":133},[3282],{"type":51,"value":3283},"% of Total",{"type":46,"tag":102,"props":3285,"children":3286},{"style":144},[3287],{"type":51,"value":1765},{"type":46,"tag":102,"props":3289,"children":3290},{"style":144},[3291],{"type":51,"value":1937},{"type":46,"tag":102,"props":3293,"children":3294},{"class":104,"line":278},[3295,3299,3304,3308,3312,3316,3321,3325],{"type":46,"tag":102,"props":3296,"children":3297},{"style":144},[3298],{"type":51,"value":3225},{"type":46,"tag":102,"props":3300,"children":3301},{"style":3228},[3302],{"type":51,"value":3303},"format",{"type":46,"tag":102,"props":3305,"children":3306},{"style":144},[3307],{"type":51,"value":1765},{"type":46,"tag":102,"props":3309,"children":3310},{"style":144},[3311],{"type":51,"value":1810},{"type":46,"tag":102,"props":3313,"children":3314},{"style":144},[3315],{"type":51,"value":167},{"type":46,"tag":102,"props":3317,"children":3318},{"style":133},[3319],{"type":51,"value":3320},"0.0%",{"type":46,"tag":102,"props":3322,"children":3323},{"style":144},[3324],{"type":51,"value":1765},{"type":46,"tag":102,"props":3326,"children":3327},{"style":144},[3328],{"type":51,"value":1937},{"type":46,"tag":102,"props":3330,"children":3331},{"class":104,"line":1416},[3332,3336,3341,3345,3349],{"type":46,"tag":102,"props":3333,"children":3334},{"style":144},[3335],{"type":51,"value":3225},{"type":46,"tag":102,"props":3337,"children":3338},{"style":3228},[3339],{"type":51,"value":3340},"sql_expression",{"type":46,"tag":102,"props":3342,"children":3343},{"style":144},[3344],{"type":51,"value":1765},{"type":46,"tag":102,"props":3346,"children":3347},{"style":144},[3348],{"type":51,"value":1810},{"type":46,"tag":102,"props":3350,"children":3351},{"style":144},[3352],{"type":51,"value":2165},{"type":46,"tag":102,"props":3354,"children":3355},{"class":104,"line":1425},[3356,3361,3366,3370,3374,3378,3383,3387],{"type":46,"tag":102,"props":3357,"children":3358},{"style":144},[3359],{"type":51,"value":3360},"        \"",{"type":46,"tag":102,"props":3362,"children":3364},{"style":3363},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[3365],{"type":51,"value":2178},{"type":46,"tag":102,"props":3367,"children":3368},{"style":144},[3369],{"type":51,"value":1765},{"type":46,"tag":102,"props":3371,"children":3372},{"style":144},[3373],{"type":51,"value":1810},{"type":46,"tag":102,"props":3375,"children":3376},{"style":144},[3377],{"type":51,"value":167},{"type":46,"tag":102,"props":3379,"children":3380},{"style":133},[3381],{"type":51,"value":3382},"call",{"type":46,"tag":102,"props":3384,"children":3385},{"style":144},[3386],{"type":51,"value":1765},{"type":46,"tag":102,"props":3388,"children":3389},{"style":144},[3390],{"type":51,"value":1937},{"type":46,"tag":102,"props":3392,"children":3393},{"class":104,"line":1434},[3394,3398,3403,3407,3411,3415,3420,3424],{"type":46,"tag":102,"props":3395,"children":3396},{"style":144},[3397],{"type":51,"value":3360},{"type":46,"tag":102,"props":3399,"children":3400},{"style":3363},[3401],{"type":51,"value":3402},"operator",{"type":46,"tag":102,"props":3404,"children":3405},{"style":144},[3406],{"type":51,"value":1765},{"type":46,"tag":102,"props":3408,"children":3409},{"style":144},[3410],{"type":51,"value":1810},{"type":46,"tag":102,"props":3412,"children":3413},{"style":144},[3414],{"type":51,"value":167},{"type":46,"tag":102,"props":3416,"children":3417},{"style":133},[3418],{"type":51,"value":3419},"Omni.OMNI_PERCENT_OF_TOTAL",{"type":46,"tag":102,"props":3421,"children":3422},{"style":144},[3423],{"type":51,"value":1765},{"type":46,"tag":102,"props":3425,"children":3426},{"style":144},[3427],{"type":51,"value":1937},{"type":46,"tag":102,"props":3429,"children":3430},{"class":104,"line":1443},[3431,3435,3440,3444,3448],{"type":46,"tag":102,"props":3432,"children":3433},{"style":144},[3434],{"type":51,"value":3360},{"type":46,"tag":102,"props":3436,"children":3437},{"style":3363},[3438],{"type":51,"value":3439},"operands",{"type":46,"tag":102,"props":3441,"children":3442},{"style":144},[3443],{"type":51,"value":1765},{"type":46,"tag":102,"props":3445,"children":3446},{"style":144},[3447],{"type":51,"value":1810},{"type":46,"tag":102,"props":3449,"children":3450},{"style":144},[3451],{"type":51,"value":3452}," [\n",{"type":46,"tag":102,"props":3454,"children":3455},{"class":104,"line":1452},[3456,3461,3465,3470,3474,3478,3482,3487,3491,3495,3499,3504,3508,3512,3516,3520,3524,3528,3532,3536,3540,3544,3548],{"type":46,"tag":102,"props":3457,"children":3458},{"style":144},[3459],{"type":51,"value":3460},"          {",{"type":46,"tag":102,"props":3462,"children":3463},{"style":144},[3464],{"type":51,"value":167},{"type":46,"tag":102,"props":3466,"children":3468},{"style":3467},"--shiki-light:#916B53;--shiki-default:#916B53;--shiki-dark:#916B53",[3469],{"type":51,"value":2178},{"type":46,"tag":102,"props":3471,"children":3472},{"style":144},[3473],{"type":51,"value":1765},{"type":46,"tag":102,"props":3475,"children":3476},{"style":144},[3477],{"type":51,"value":1810},{"type":46,"tag":102,"props":3479,"children":3480},{"style":144},[3481],{"type":51,"value":167},{"type":46,"tag":102,"props":3483,"children":3484},{"style":133},[3485],{"type":51,"value":3486},"field",{"type":46,"tag":102,"props":3488,"children":3489},{"style":144},[3490],{"type":51,"value":1765},{"type":46,"tag":102,"props":3492,"children":3493},{"style":144},[3494],{"type":51,"value":1828},{"type":46,"tag":102,"props":3496,"children":3497},{"style":144},[3498],{"type":51,"value":167},{"type":46,"tag":102,"props":3500,"children":3501},{"style":3467},[3502],{"type":51,"value":3503},"field_name",{"type":46,"tag":102,"props":3505,"children":3506},{"style":144},[3507],{"type":51,"value":1765},{"type":46,"tag":102,"props":3509,"children":3510},{"style":144},[3511],{"type":51,"value":1810},{"type":46,"tag":102,"props":3513,"children":3514},{"style":144},[3515],{"type":51,"value":167},{"type":46,"tag":102,"props":3517,"children":3518},{"style":133},[3519],{"type":51,"value":3167},{"type":46,"tag":102,"props":3521,"children":3522},{"style":144},[3523],{"type":51,"value":1765},{"type":46,"tag":102,"props":3525,"children":3526},{"style":144},[3527],{"type":51,"value":1828},{"type":46,"tag":102,"props":3529,"children":3530},{"style":144},[3531],{"type":51,"value":167},{"type":46,"tag":102,"props":3533,"children":3534},{"style":3467},[3535],{"type":51,"value":798},{"type":46,"tag":102,"props":3537,"children":3538},{"style":144},[3539],{"type":51,"value":1765},{"type":46,"tag":102,"props":3541,"children":3542},{"style":144},[3543],{"type":51,"value":1810},{"type":46,"tag":102,"props":3545,"children":3546},{"style":144},[3547],{"type":51,"value":1850},{"type":46,"tag":102,"props":3549,"children":3550},{"style":144},[3551],{"type":51,"value":1855},{"type":46,"tag":102,"props":3553,"children":3555},{"class":104,"line":3554},13,[3556],{"type":46,"tag":102,"props":3557,"children":3558},{"style":144},[3559],{"type":51,"value":3560},"        ]\n",{"type":46,"tag":102,"props":3562,"children":3564},{"class":104,"line":3563},14,[3565],{"type":46,"tag":102,"props":3566,"children":3567},{"style":144},[3568],{"type":51,"value":3569},"      }\n",{"type":46,"tag":102,"props":3571,"children":3573},{"class":104,"line":3572},15,[3574],{"type":46,"tag":102,"props":3575,"children":3576},{"style":144},[3577],{"type":51,"value":3578},"    }]\n",{"type":46,"tag":102,"props":3580,"children":3582},{"class":104,"line":3581},16,[3583],{"type":46,"tag":102,"props":3584,"children":3585},{"style":144},[3586],{"type":51,"value":1449},{"type":46,"tag":102,"props":3588,"children":3590},{"class":104,"line":3589},17,[3591],{"type":46,"tag":102,"props":3592,"children":3593},{"style":144},[3594],{"type":51,"value":2014},{"type":46,"tag":54,"props":3596,"children":3597},{},[3598,3603,3604,3609,3611,3616,3618,3624,3626,3631,3633,3638],{"type":46,"tag":67,"props":3599,"children":3600},{},[3601],{"type":51,"value":3602},"The #1 gotcha:",{"type":51,"value":720},{"type":46,"tag":75,"props":3605,"children":3607},{"className":3606},[],[3608],{"type":51,"value":711},{"type":51,"value":3610}," must also appear in ",{"type":46,"tag":75,"props":3612,"children":3614},{"className":3613},[],[3615],{"type":51,"value":686},{"type":51,"value":3617}," (and the outer ",{"type":46,"tag":75,"props":3619,"children":3621},{"className":3620},[],[3622],{"type":51,"value":3623},"queryPresentation.fields",{"type":51,"value":3625}," for dashboard tiles). A calc defined in ",{"type":46,"tag":75,"props":3627,"children":3629},{"className":3628},[],[3630],{"type":51,"value":678},{"type":51,"value":3632}," but absent from ",{"type":46,"tag":75,"props":3634,"children":3636},{"className":3635},[],[3637],{"type":51,"value":1584},{"type":51,"value":3639}," is computed but never rendered.",{"type":46,"tag":54,"props":3641,"children":3642},{},[3643,3645,3650,3652,3658,3660,3665,3666,3672,3673,3678,3679,3684,3685,3691],{"type":51,"value":3644},"The five quick-template operators (each takes one ",{"type":46,"tag":75,"props":3646,"children":3648},{"className":3647},[],[3649],{"type":51,"value":3486},{"type":51,"value":3651}," operand with ",{"type":46,"tag":75,"props":3653,"children":3655},{"className":3654},[],[3656],{"type":51,"value":3657},"for_calc: true",{"type":51,"value":3659},"):\n",{"type":46,"tag":75,"props":3661,"children":3663},{"className":3662},[],[3664],{"type":51,"value":3419},{"type":51,"value":616},{"type":46,"tag":75,"props":3667,"children":3669},{"className":3668},[],[3670],{"type":51,"value":3671},"Omni.OMNI_PERCENT_OF_PREVIOUS",{"type":51,"value":616},{"type":46,"tag":75,"props":3674,"children":3676},{"className":3675},[],[3677],{"type":51,"value":940},{"type":51,"value":616},{"type":46,"tag":75,"props":3680,"children":3682},{"className":3681},[],[3683],{"type":51,"value":933},{"type":51,"value":616},{"type":46,"tag":75,"props":3686,"children":3688},{"className":3687},[],[3689],{"type":51,"value":3690},"Omni.OMNI_RANK",{"type":51,"value":386},{"type":46,"tag":54,"props":3693,"children":3694},{},[3695,3697,3703,3705,3725,3727,3733,3735,3740,3742,3747,3749,3758,3760,3766,3768,3773,3775,3786,3788,3794,3795,3806,3808,3813,3815,3820,3822,3827],{"type":51,"value":3696},"Use ",{"type":46,"tag":75,"props":3698,"children":3700},{"className":3699},[],[3701],{"type":51,"value":3702},"omni query run",{"type":51,"value":3704}," with a hand-authored or copied AST when you already know the calc shape. ",{"type":46,"tag":67,"props":3706,"children":3707},{},[3708,3710,3715,3717,3723],{"type":51,"value":3709},"To ",{"type":46,"tag":353,"props":3711,"children":3712},{},[3713],{"type":51,"value":3714},"generate",{"type":51,"value":3716}," anything non-trivial — table calculations, period-over-period, multi-step analysis — prefer the agentic path (",{"type":46,"tag":75,"props":3718,"children":3720},{"className":3719},[],[3721],{"type":51,"value":3722},"omni ai job-submit",{"type":51,"value":3724},"):",{"type":51,"value":3726}," it authors calcs that ",{"type":46,"tag":75,"props":3728,"children":3730},{"className":3729},[],[3731],{"type":51,"value":3732},"generate-query",{"type":51,"value":3734}," silently drops (e.g. month-over-month % change). To get a ",{"type":46,"tag":353,"props":3736,"children":3737},{},[3738],{"type":51,"value":3739},"reusable",{"type":51,"value":3741}," AST out of an agentic job, lift the structured query \u002F ",{"type":46,"tag":75,"props":3743,"children":3745},{"className":3744},[],[3746],{"type":51,"value":3204},{"type":51,"value":3748}," from the job's ",{"type":46,"tag":67,"props":3750,"children":3751},{},[3752],{"type":46,"tag":75,"props":3753,"children":3755},{"className":3754},[],[3756],{"type":51,"value":3757},"actions[].generate_query",{"type":51,"value":3759}," result (not the ",{"type":46,"tag":75,"props":3761,"children":3763},{"className":3762},[],[3764],{"type":51,"value":3765},"resultSummary",{"type":51,"value":3767},", and not a ",{"type":46,"tag":75,"props":3769,"children":3771},{"className":3770},[],[3772],{"type":51,"value":595},{"type":51,"value":3774},"\u002FSQL fallback), then ",{"type":46,"tag":67,"props":3776,"children":3777},{},[3778,3780,3785],{"type":51,"value":3779},"re-run ",{"type":46,"tag":353,"props":3781,"children":3782},{},[3783],{"type":51,"value":3784},"your assembled",{"type":51,"value":429},{"type":51,"value":3787}," with ",{"type":46,"tag":75,"props":3789,"children":3791},{"className":3790},[],[3792],{"type":51,"value":3793},"swallow_errors:false",{"type":51,"value":727},{"type":46,"tag":67,"props":3796,"children":3797},{},[3798,3800],{"type":51,"value":3799},"diff the values against the job's ",{"type":46,"tag":75,"props":3801,"children":3803},{"className":3802},[],[3804],{"type":51,"value":3805},"csvResult",{"type":51,"value":3807},". The job already executed the calc, so the re-run isn't re-proving the math — it's checking your ",{"type":46,"tag":353,"props":3809,"children":3810},{},[3811],{"type":51,"value":3812},"reshape",{"type":51,"value":3814}," (a dropped\u002Frenamed field is the kind of translation failure that \"it ran and returned rows\" would miss; see ",{"type":46,"tag":2092,"props":3816,"children":3817},{"href":920},[3818],{"type":51,"value":3819},"table-calculations.md",{"type":51,"value":3821}," §6). Reserve ",{"type":46,"tag":75,"props":3823,"children":3825},{"className":3824},[],[3826],{"type":51,"value":3732},{"type":51,"value":3828}," for simple deterministic single queries, and for shape-only drafting where query execution isn't permitted.",{"type":46,"tag":54,"props":3830,"children":3831},{},[3832,3834,3840,3842,3847],{"type":51,"value":3833},"Query tasks are read-only unless the user explicitly asks to change the model. If a field appears missing, inspect topics\u002Fdashboard queries and use the right model\u002Ftopic\u002Fbranch or report the missing-field blocker — don't create branches, add measures, or edit YAML just to make a query work. (And don't satisfy a calc request with client-side math or an existing model field like ",{"type":46,"tag":75,"props":3835,"children":3837},{"className":3836},[],[3838],{"type":51,"value":3839},"users.tier_label",{"type":51,"value":3841}," — build and validate the table calc; see ",{"type":46,"tag":353,"props":3843,"children":3844},{},[3845],{"type":51,"value":3846},"Known Issues",{"type":51,"value":3848},".)",{"type":46,"tag":54,"props":3850,"children":3851},{},[3852],{"type":51,"value":3853},"Quick recipes for common calc requests:",{"type":46,"tag":553,"props":3855,"children":3856},{},[3857,3895,3917,3987,4032,4091,4181,4237,4299],{"type":46,"tag":557,"props":3858,"children":3859},{},[3860,3865,3867,3872,3874,3879,3881,3887,3889,3894],{"type":46,"tag":67,"props":3861,"children":3862},{},[3863],{"type":51,"value":3864},"Percent of total",{"type":51,"value":3866},": add a calc using ",{"type":46,"tag":75,"props":3868,"children":3870},{"className":3869},[],[3871],{"type":51,"value":3419},{"type":51,"value":3873}," with one ",{"type":46,"tag":75,"props":3875,"children":3877},{"className":3876},[],[3878],{"type":51,"value":3657},{"type":51,"value":3880}," operand pointing at the selected measure field; set ",{"type":46,"tag":75,"props":3882,"children":3884},{"className":3883},[],[3885],{"type":51,"value":3886},"format: \"0.0%\"",{"type":51,"value":3888},"; include the calc name in ",{"type":46,"tag":75,"props":3890,"children":3892},{"className":3891},[],[3893],{"type":51,"value":686},{"type":51,"value":386},{"type":46,"tag":557,"props":3896,"children":3897},{},[3898,3903,3904,3909,3910,3915],{"type":46,"tag":67,"props":3899,"children":3900},{},[3901],{"type":51,"value":3902},"Running total",{"type":51,"value":3866},{"type":46,"tag":75,"props":3905,"children":3907},{"className":3906},[],[3908],{"type":51,"value":933},{"type":51,"value":3873},{"type":46,"tag":75,"props":3911,"children":3913},{"className":3912},[],[3914],{"type":51,"value":3657},{"type":51,"value":3916}," field operand. Sort the time dimension ascending before presenting values; do not sort descending and then reverse\u002Frecompute the running total outside Omni.",{"type":46,"tag":557,"props":3918,"children":3919},{},[3920,3925,3927,3933,3935,3940,3942,3947,3949,3955,3956,3962,3964,3970,3972,3978,3980,3985],{"type":46,"tag":67,"props":3921,"children":3922},{},[3923],{"type":51,"value":3924},"Trailing 3-period moving average",{"type":51,"value":3926},": if you are unsure of the exact AST, harvest it from an agentic job — ",{"type":46,"tag":75,"props":3928,"children":3930},{"className":3929},[],[3931],{"type":51,"value":3932},"omni ai job-submit \u003CmodelId> \"monthly revenue with a trailing 3-month moving average as a table calculation\"",{"type":51,"value":3934},", lift the ",{"type":46,"tag":75,"props":3936,"children":3938},{"className":3937},[],[3939],{"type":51,"value":3204},{"type":51,"value":3941}," from ",{"type":46,"tag":75,"props":3943,"children":3945},{"className":3944},[],[3946],{"type":51,"value":3757},{"type":51,"value":3948},", then validate with ",{"type":46,"tag":75,"props":3950,"children":3952},{"className":3951},[],[3953],{"type":51,"value":3954},"query run",{"type":51,"value":1233},{"type":46,"tag":75,"props":3957,"children":3959},{"className":3958},[],[3960],{"type":51,"value":3961},"generate-query --run-query=false",{"type":51,"value":3963}," is the simple\u002Fshape-only fallback). The expected shape is ",{"type":46,"tag":75,"props":3965,"children":3967},{"className":3966},[],[3968],{"type":51,"value":3969},"Omni.OMNI_FX_AVERAGE",{"type":51,"value":3971}," over ",{"type":46,"tag":75,"props":3973,"children":3975},{"className":3974},[],[3976],{"type":51,"value":3977},"Omni.OMNI_OFFSET_MULTI(field, -2, 0, 3, 1)",{"type":51,"value":3979},". If the output is a raw ",{"type":46,"tag":75,"props":3981,"children":3983},{"className":3982},[],[3984],{"type":51,"value":956},{"type":51,"value":3986},", rewrite it to this canonical Omni calc shape unless the user specifically asked for a custom SQL window not expressible with Omni calc operators.",{"type":46,"tag":557,"props":3988,"children":3989},{},[3990,3995,3996,4001,4003,4008,4010,4015,4017,4023,4025,4030],{"type":46,"tag":67,"props":3991,"children":3992},{},[3993],{"type":51,"value":3994},"Month-over-month % change",{"type":51,"value":3866},{"type":46,"tag":75,"props":3997,"children":3999},{"className":3998},[],[4000],{"type":51,"value":940},{"type":51,"value":4002}," with the same single ",{"type":46,"tag":75,"props":4004,"children":4006},{"className":4005},[],[4007],{"type":51,"value":3657},{"type":51,"value":4009}," revenue operand; sort the date field ascending; set ",{"type":46,"tag":75,"props":4011,"children":4013},{"className":4012},[],[4014],{"type":51,"value":3886},{"type":51,"value":4016},"; do not use ",{"type":46,"tag":75,"props":4018,"children":4020},{"className":4019},[],[4021],{"type":51,"value":4022},"omni_period_pivot",{"type":51,"value":4024},", raw SQL, or a hand-authored ",{"type":46,"tag":75,"props":4026,"children":4028},{"className":4027},[],[4029],{"type":51,"value":963},{"type":51,"value":4031}," window when the template operator fits.",{"type":46,"tag":557,"props":4033,"children":4034},{},[4035,4040,4042,4047,4049,4055,4056,4062,4063,4069,4071,4076,4077,4082,4084,4089],{"type":46,"tag":67,"props":4036,"children":4037},{},[4038],{"type":51,"value":4039},"Row total across pivot columns",{"type":51,"value":4041},": for a pivoted query, set a numeric ",{"type":46,"tag":75,"props":4043,"children":4045},{"className":4044},[],[4046],{"type":51,"value":770},{"type":51,"value":4048}," and add a calc with ",{"type":46,"tag":75,"props":4050,"children":4052},{"className":4051},[],[4053],{"type":51,"value":4054},"outside_pivot: true",{"type":51,"value":616},{"type":46,"tag":75,"props":4057,"children":4059},{"className":4058},[],[4060],{"type":51,"value":4061},"Omni.OMNI_FX_SUM",{"type":51,"value":942},{"type":46,"tag":75,"props":4064,"children":4066},{"className":4065},[],[4067],{"type":51,"value":4068},"Omni.OMNI_PIVOT_OFFSET(field, 0, 0, 1, 50)",{"type":51,"value":4070}," to sweep across pivot columns. Include the row-total ",{"type":46,"tag":75,"props":4072,"children":4074},{"className":4073},[],[4075],{"type":51,"value":711},{"type":51,"value":713},{"type":46,"tag":75,"props":4078,"children":4080},{"className":4079},[],[4081],{"type":51,"value":686},{"type":51,"value":4083},"; a pivoted query with ",{"type":46,"tag":75,"props":4085,"children":4087},{"className":4086},[],[4088],{"type":51,"value":2577},{"type":51,"value":4090}," is invalid.",{"type":46,"tag":557,"props":4092,"children":4093},{},[4094,4099,4101,4107,4109,4115,4117,4123,4125,4131,4133,4139,4141,4147,4149,4155,4157,4163,4165,4171,4173,4179],{"type":46,"tag":67,"props":4095,"children":4096},{},[4097],{"type":51,"value":4098},"Multi-branch tier labels",{"type":51,"value":4100},": use ",{"type":46,"tag":75,"props":4102,"children":4104},{"className":4103},[],[4105],{"type":51,"value":4106},"Omni.OMNI_FX_IFS",{"type":51,"value":4108},", not an existing model field or ",{"type":46,"tag":75,"props":4110,"children":4112},{"className":4111},[],[4113],{"type":51,"value":4114},"SqlStdOperatorTable.CASE",{"type":51,"value":4116},", for prompts like ",{"type":46,"tag":75,"props":4118,"children":4120},{"className":4119},[],[4121],{"type":51,"value":4122},"High if revenue > 10000, Mid if > 1000, else Low",{"type":51,"value":4124},". ",{"type":46,"tag":75,"props":4126,"children":4128},{"className":4127},[],[4129],{"type":51,"value":4130},"OMNI_FX_IFS",{"type":51,"value":4132}," operands alternate ",{"type":46,"tag":75,"props":4134,"children":4136},{"className":4135},[],[4137],{"type":51,"value":4138},"(condition, value)",{"type":51,"value":4140},". Represent the default branch as a final tautology such as ",{"type":46,"tag":75,"props":4142,"children":4144},{"className":4143},[],[4145],{"type":51,"value":4146},"SqlStdOperatorTable.EQUALS(1, 1)",{"type":51,"value":4148}," followed by ",{"type":46,"tag":75,"props":4150,"children":4152},{"className":4151},[],[4153],{"type":51,"value":4154},"\"Low\"",{"type":51,"value":4156},". Build labels like ",{"type":46,"tag":75,"props":4158,"children":4160},{"className":4159},[],[4161],{"type":51,"value":4162},"\"High - Acme Corp\"",{"type":51,"value":4164}," with nested binary ",{"type":46,"tag":75,"props":4166,"children":4168},{"className":4167},[],[4169],{"type":51,"value":4170},"Omni.OMNI_FX_AMPERSAND",{"type":51,"value":4172}," calls: ",{"type":46,"tag":75,"props":4174,"children":4176},{"className":4175},[],[4177],{"type":51,"value":4178},"(tier & \" - \") & \u003Cname field>",{"type":51,"value":4180},". If the tier depends on a grouped measure, create two calcs: one for the tier and one for the concatenated label.",{"type":46,"tag":557,"props":4182,"children":4183},{},[4184,4189,4190,4196,4198,4204,4205,4211,4213,4219,4221,4227,4229,4235],{"type":46,"tag":67,"props":4185,"children":4186},{},[4187],{"type":51,"value":4188},"SUMIF-style filtered total broadcast on every row",{"type":51,"value":4100},{"type":46,"tag":75,"props":4191,"children":4193},{"className":4192},[],[4194],{"type":51,"value":4195},"Omni.OMNI_FX_SUM_IF",{"type":51,"value":4197}," (underscore between ",{"type":46,"tag":75,"props":4199,"children":4201},{"className":4200},[],[4202],{"type":51,"value":4203},"SUM",{"type":51,"value":727},{"type":46,"tag":75,"props":4206,"children":4208},{"className":4207},[],[4209],{"type":51,"value":4210},"IF",{"type":51,"value":4212},"). Both the criteria range and sum range must be full-column ",{"type":46,"tag":75,"props":4214,"children":4216},{"className":4215},[],[4217],{"type":51,"value":4218},"Omni.OMNI_OFFSET_MULTI",{"type":51,"value":4220}," calls with ",{"type":46,"tag":75,"props":4222,"children":4224},{"className":4223},[],[4225],{"type":51,"value":4226},"(field, -536870911, 0, 1073741823, 1)",{"type":51,"value":4228},". The criterion is a string literal like ",{"type":46,"tag":75,"props":4230,"children":4232},{"className":4231},[],[4233],{"type":51,"value":4234},"\"Complete\"",{"type":51,"value":4236},", not a SQL predicate.",{"type":46,"tag":557,"props":4238,"children":4239},{},[4240,4245,4247,4253,4255,4261,4263,4268,4270,4275,4277,4283,4285,4291,4293,4298],{"type":46,"tag":67,"props":4241,"children":4242},{},[4243],{"type":51,"value":4244},"VLOOKUP-style in-result lookup",{"type":51,"value":4246},": first attempt ",{"type":46,"tag":75,"props":4248,"children":4250},{"className":4249},[],[4251],{"type":51,"value":4252},"Omni.OMNI_FX_VLOOKUP",{"type":51,"value":4254}," with four operands: lookup value, key field, full-column ",{"type":46,"tag":75,"props":4256,"children":4258},{"className":4257},[],[4259],{"type":51,"value":4260},"OMNI_OFFSET_MULTI",{"type":51,"value":4262}," over the key field, and a 1-based column number into ",{"type":46,"tag":75,"props":4264,"children":4266},{"className":4265},[],[4267],{"type":51,"value":686},{"type":51,"value":4269}," starting at the key column. Use literal nodes for static lookup values and column numbers. Validate the query. If a static string lookup like ",{"type":46,"tag":75,"props":4271,"children":4273},{"className":4272},[],[4274],{"type":51,"value":4234},{"type":51,"value":4276}," fails with ",{"type":46,"tag":75,"props":4278,"children":4280},{"className":4279},[],[4281],{"type":51,"value":4282},"No referenced query with id Complete found in query",{"type":51,"value":4284},", report that this Omni deployment is treating the string as a query reference, stop retrying VLOOKUP variants, and use the ",{"type":46,"tag":75,"props":4286,"children":4288},{"className":4287},[],[4289],{"type":51,"value":4290},"OMNI_FX_SUM_IF",{"type":51,"value":4292}," broadcast pattern when the user needs a single status revenue repeated on every row. Do not replace this with ",{"type":46,"tag":75,"props":4294,"children":4296},{"className":4295},[],[4297],{"type":51,"value":595},{"type":51,"value":386},{"type":46,"tag":557,"props":4300,"children":4301},{},[4302,4307,4308,4314,4316,4322,4324,4330,4332,4338,4339,4345,4347,4353,4355,4361],{"type":46,"tag":67,"props":4303,"children":4304},{},[4305],{"type":51,"value":4306},"Date difference",{"type":51,"value":4100},{"type":46,"tag":75,"props":4309,"children":4311},{"className":4310},[],[4312],{"type":51,"value":4313},"Omni.OMNI_FX_DATEDIF",{"type":51,"value":4315}," in AST order ",{"type":46,"tag":75,"props":4317,"children":4319},{"className":4318},[],[4320],{"type":51,"value":4321},"(unit_literal, start_date, end_date)",{"type":51,"value":4323},", with the unit literal ",{"type":46,"tag":75,"props":4325,"children":4327},{"className":4326},[],[4328],{"type":51,"value":4329},"\"DAY\"",{"type":51,"value":4331}," and date-truncated operands such as ",{"type":46,"tag":75,"props":4333,"children":4335},{"className":4334},[],[4336],{"type":51,"value":4337},"created_at[date]",{"type":51,"value":727},{"type":46,"tag":75,"props":4340,"children":4342},{"className":4341},[],[4343],{"type":51,"value":4344},"shipped_at[date]",{"type":51,"value":4346},". Do not substitute a native model field unless the user asked for that existing field rather than a calculated column. A bare timestamp operand can produce blank values under ",{"type":46,"tag":75,"props":4348,"children":4350},{"className":4349},[],[4351],{"type":51,"value":4352},"swallow_errors",{"type":51,"value":4354},"; select ",{"type":46,"tag":75,"props":4356,"children":4358},{"className":4357},[],[4359],{"type":51,"value":4360},"[date]",{"type":51,"value":4362}," timeframes or cast to DATE. Filter out or separately explain null shipped dates so the validated diff column contains populated integer values.",{"type":46,"tag":54,"props":4364,"children":4365},{},[4366,4368,4374,4375,4381,4383,4387,4389,4395],{"type":51,"value":4367},"For exact JSON AST examples — running totals, moving averages, conditional labels, pivot row totals, DATEDIF, SUM_IF, VLOOKUP, plus the full operator catalog (",{"type":46,"tag":75,"props":4369,"children":4371},{"className":4370},[],[4372],{"type":51,"value":4373},"Omni.*",{"type":51,"value":727},{"type":46,"tag":75,"props":4376,"children":4378},{"className":4377},[],[4379],{"type":51,"value":4380},"SqlStdOperatorTable.*",{"type":51,"value":4382},"), AST node types, validation rules, and the round-trip strategy for unfamiliar calcs — see ",{"type":46,"tag":2092,"props":4384,"children":4385},{"href":920},[4386],{"type":51,"value":920},{"type":51,"value":4388},". Keep ",{"type":46,"tag":75,"props":4390,"children":4392},{"className":4391},[],[4393],{"type":51,"value":4394},"SKILL.md",{"type":51,"value":4396}," as the workflow guardrail and the reference file as the source of detailed shapes.",{"type":46,"tag":54,"props":4398,"children":4399},{},[4400,4402,4408,4410,4416,4418,4423,4425,4431],{"type":51,"value":4401},"At execution, calcs compile into an outer ",{"type":46,"tag":75,"props":4403,"children":4405},{"className":4404},[],[4406],{"type":51,"value":4407},"SELECT",{"type":51,"value":4409}," wrapping the base aggregation; window-style operators emit ",{"type":46,"tag":75,"props":4411,"children":4413},{"className":4412},[],[4414],{"type":51,"value":4415},"... OVER (...)",{"type":51,"value":4417}," there, so the shared data model never needs window functions to support them. In pivoted queries, template operators auto-partition by the pivot column for per-segment series; set ",{"type":46,"tag":75,"props":4419,"children":4421},{"className":4420},[],[4422],{"type":51,"value":4054},{"type":51,"value":4424}," and wrap an aggregator around ",{"type":46,"tag":75,"props":4426,"children":4428},{"className":4427},[],[4429],{"type":51,"value":4430},"OMNI_PIVOT_OFFSET",{"type":51,"value":4432}," for a row-summary that sweeps across pivot columns.",{"type":46,"tag":84,"props":4434,"children":4436},{"id":4435},"running-raw-sql-usereditedsql",[4437,4439,4444],{"type":51,"value":4438},"Running Raw SQL (",{"type":46,"tag":75,"props":4440,"children":4442},{"className":4441},[],[4443],{"type":51,"value":595},{"type":51,"value":2608},{"type":46,"tag":60,"props":4446,"children":4447},{},[4448,4485],{"type":46,"tag":54,"props":4449,"children":4450},{},[4451,4456,4458,4462,4464,4469,4471,4476,4478,4483],{"type":46,"tag":67,"props":4452,"children":4453},{},[4454],{"type":51,"value":4455},"Given SQL? Reproduce it through a topic first",{"type":51,"value":4457}," (see ",{"type":46,"tag":353,"props":4459,"children":4460},{},[4461],{"type":51,"value":3846},{"type":51,"value":4463},"). Express the SQL's intent through the semantic layer; reach for raw ",{"type":46,"tag":75,"props":4465,"children":4467},{"className":4466},[],[4468],{"type":51,"value":595},{"type":51,"value":4470}," only when no topic can express it (SQL-first migration, warehouse-specific SQL, one-off ad-hoc read) or the user asks to run it as-is. If a faithful reproduction would need a field\u002Ftopic that doesn't exist but ",{"type":46,"tag":353,"props":4472,"children":4473},{},[4474],{"type":51,"value":4475},"should",{"type":51,"value":4477},", propose modeling it (",{"type":46,"tag":75,"props":4479,"children":4481},{"className":4480},[],[4482],{"type":51,"value":1138},{"type":51,"value":4484},") rather than defaulting to raw SQL.",{"type":46,"tag":54,"props":4486,"children":4487},{},[4488,4500,4502,4507,4509,4525,4527,4533,4535,4541,4543,4548,4550,4555,4557,4563,4565,4577,4579,4583,4585,4590,4592,4598,4600,4605,4607,4612],{"type":46,"tag":67,"props":4489,"children":4490},{},[4491,4493,4498],{"type":51,"value":4492},"Reading ",{"type":46,"tag":75,"props":4494,"children":4496},{"className":4495},[],[4497],{"type":51,"value":3732},{"type":51,"value":4499}," output:",{"type":51,"value":4501}," when the topic lacks a measure the metric needs, ",{"type":46,"tag":75,"props":4503,"children":4505},{"className":4504},[],[4506],{"type":51,"value":3732},{"type":51,"value":4508}," returns a ",{"type":46,"tag":67,"props":4510,"children":4511},{},[4512,4518,4520],{"type":46,"tag":75,"props":4513,"children":4515},{"className":4514},[],[4516],{"type":51,"value":4517},"${}",{"type":51,"value":4519},"-templated ",{"type":46,"tag":75,"props":4521,"children":4523},{"className":4522},[],[4524],{"type":51,"value":595},{"type":51,"value":4526}," (e.g. ",{"type":46,"tag":75,"props":4528,"children":4530},{"className":4529},[],[4531],{"type":51,"value":4532},"SUM(${view.sale_price}) AS sale_price_sum FROM ${Topic}",{"type":51,"value":4534},") and lists its SQL-output aliases (like ",{"type":46,"tag":75,"props":4536,"children":4538},{"className":4537},[],[4539],{"type":51,"value":4540},"sale_price_sum",{"type":51,"value":4542},") in ",{"type":46,"tag":75,"props":4544,"children":4546},{"className":4545},[],[4547],{"type":51,"value":1584},{"type":51,"value":4549},". Those aliases are ",{"type":46,"tag":67,"props":4551,"children":4552},{},[4553],{"type":51,"value":4554},"not model fields",{"type":51,"value":4556}," — don't strip the SQL and try to run them semantically (they won't resolve). And the ",{"type":46,"tag":75,"props":4558,"children":4560},{"className":4559},[],[4561],{"type":51,"value":4562},"${Topic}",{"type":51,"value":4564}," token resolves ",{"type":46,"tag":67,"props":4566,"children":4567},{},[4568,4570,4575],{"type":51,"value":4569},"only inside ",{"type":46,"tag":75,"props":4571,"children":4573},{"className":4572},[],[4574],{"type":51,"value":3732},{"type":51,"value":4576},"'s own execution",{"type":51,"value":4578}," — the templated query is ",{"type":46,"tag":67,"props":4580,"children":4581},{},[4582],{"type":51,"value":1077},{"type":51,"value":4584}," directly runnable via ",{"type":46,"tag":75,"props":4586,"children":4588},{"className":4587},[],[4589],{"type":51,"value":3954},{"type":51,"value":4591}," or persistable as a dashboard tile (it errors with ",{"type":46,"tag":75,"props":4593,"children":4595},{"className":4594},[],[4596],{"type":51,"value":4597},"No such view \"Order Items\"",{"type":51,"value":4599},"). So don't reuse it as-is; treat it as a ",{"type":46,"tag":67,"props":4601,"children":4602},{},[4603],{"type":51,"value":4604},"signal that the topic is missing a measure",{"type":51,"value":4606}," and add that measure (",{"type":46,"tag":75,"props":4608,"children":4610},{"className":4609},[],[4611],{"type":51,"value":1138},{"type":51,"value":4613},") so the metric becomes a clean semantic field.",{"type":46,"tag":54,"props":4615,"children":4616},{},[4617,4622,4624,4629],{"type":46,"tag":75,"props":4618,"children":4620},{"className":4619},[],[4621],{"type":51,"value":595},{"type":51,"value":4623}," is a ",{"type":46,"tag":67,"props":4625,"children":4626},{},[4627],{"type":51,"value":4628},"non-topic query pathway",{"type":51,"value":4630}," — the same family as a bare-view query (see \"Fallback — non-topic query pathways\"). It's an escape hatch for SQL the semantic layer can't express; prefer a topic or semantic fields when they fit.",{"type":46,"tag":91,"props":4632,"children":4634},{"className":93,"code":4633,"language":95,"meta":96,"style":96},"omni query run --body '{\n  \"query\": {\n    \"modelId\": \"\u003Cmodel-id>\",\n    \"fields\": [],\n    \"userEditedSQL\": \"select count(*) as cnt from ECOMM.ORDER_ITEMS\"\n  }\n}'\n",[4635],{"type":46,"tag":75,"props":4636,"children":4637},{"__ignoreMap":96},[4638,4665,4672,4680,4688,4696,4703],{"type":46,"tag":102,"props":4639,"children":4640},{"class":104,"line":105},[4641,4645,4649,4653,4657,4661],{"type":46,"tag":102,"props":4642,"children":4643},{"style":198},[4644],{"type":51,"value":15},{"type":46,"tag":102,"props":4646,"children":4647},{"style":133},[4648],{"type":51,"value":429},{"type":46,"tag":102,"props":4650,"children":4651},{"style":133},[4652],{"type":51,"value":455},{"type":46,"tag":102,"props":4654,"children":4655},{"style":133},[4656],{"type":51,"value":1355},{"type":46,"tag":102,"props":4658,"children":4659},{"style":144},[4660],{"type":51,"value":1360},{"type":46,"tag":102,"props":4662,"children":4663},{"style":133},[4664],{"type":51,"value":1365},{"type":46,"tag":102,"props":4666,"children":4667},{"class":104,"line":115},[4668],{"type":46,"tag":102,"props":4669,"children":4670},{"style":133},[4671],{"type":51,"value":1373},{"type":46,"tag":102,"props":4673,"children":4674},{"class":104,"line":33},[4675],{"type":46,"tag":102,"props":4676,"children":4677},{"style":133},[4678],{"type":51,"value":4679},"    \"modelId\": \"\u003Cmodel-id>\",\n",{"type":46,"tag":102,"props":4681,"children":4682},{"class":104,"line":221},[4683],{"type":46,"tag":102,"props":4684,"children":4685},{"style":133},[4686],{"type":51,"value":4687},"    \"fields\": [],\n",{"type":46,"tag":102,"props":4689,"children":4690},{"class":104,"line":259},[4691],{"type":46,"tag":102,"props":4692,"children":4693},{"style":133},[4694],{"type":51,"value":4695},"    \"userEditedSQL\": \"select count(*) as cnt from ECOMM.ORDER_ITEMS\"\n",{"type":46,"tag":102,"props":4697,"children":4698},{"class":104,"line":269},[4699],{"type":46,"tag":102,"props":4700,"children":4701},{"style":133},[4702],{"type":51,"value":1449},{"type":46,"tag":102,"props":4704,"children":4705},{"class":104,"line":278},[4706,4710],{"type":46,"tag":102,"props":4707,"children":4708},{"style":133},[4709],{"type":51,"value":1458},{"type":46,"tag":102,"props":4711,"children":4712},{"style":144},[4713],{"type":51,"value":1463},{"type":46,"tag":553,"props":4715,"children":4716},{},[4717,4767,4779,4819,4850,4892],{"type":46,"tag":557,"props":4718,"children":4719},{},[4720,4730,4732,4738,4740,4745,4747,4752,4753,4758,4760,4765],{"type":46,"tag":67,"props":4721,"children":4722},{},[4723,4728],{"type":46,"tag":75,"props":4724,"children":4726},{"className":4725},[],[4727],{"type":51,"value":1584},{"type":51,"value":4729}," must be present",{"type":51,"value":4731}," (an array; may be empty ",{"type":46,"tag":75,"props":4733,"children":4735},{"className":4734},[],[4736],{"type":51,"value":4737},"[]",{"type":51,"value":4739},"); ",{"type":46,"tag":75,"props":4741,"children":4743},{"className":4742},[],[4744],{"type":51,"value":996},{"type":51,"value":4746}," is not needed. The SQL is authoritative — populated ",{"type":46,"tag":75,"props":4748,"children":4750},{"className":4749},[],[4751],{"type":51,"value":1584},{"type":51,"value":764},{"type":46,"tag":75,"props":4754,"children":4756},{"className":4755},[],[4757],{"type":51,"value":996},{"type":51,"value":4759}," are ignored when ",{"type":46,"tag":75,"props":4761,"children":4763},{"className":4762},[],[4764],{"type":51,"value":595},{"type":51,"value":4766}," is set.",{"type":46,"tag":557,"props":4768,"children":4769},{},[4770,4772,4777],{"type":51,"value":4771},"Runs against the model's ",{"type":46,"tag":67,"props":4773,"children":4774},{},[4775],{"type":51,"value":4776},"connection",{"type":51,"value":4778}," — write warehouse-dialect SQL with fully-qualified names, not field references.",{"type":46,"tag":557,"props":4780,"children":4781},{},[4782,4791,4793,4799,4801,4810,4812,4817],{"type":46,"tag":67,"props":4783,"children":4784},{},[4785],{"type":46,"tag":75,"props":4786,"children":4788},{"className":4787},[],[4789],{"type":51,"value":4790},"\"rewriteSql\": false",{"type":51,"value":4792}," runs your SQL verbatim (the default parses and re-emits it — re-quoting identifiers, aliasing projections into the ",{"type":46,"tag":75,"props":4794,"children":4796},{"className":4795},[],[4797],{"type":51,"value":4798},"view.field",{"type":51,"value":4800}," namespace). ",{"type":46,"tag":67,"props":4802,"children":4803},{},[4804],{"type":46,"tag":75,"props":4805,"children":4807},{"className":4806},[],[4808],{"type":51,"value":4809},"\"dbtMode\": true",{"type":51,"value":4811}," allows Jinja\u002Fdbt templating. (Both are camelCase; the ",{"type":46,"tag":75,"props":4813,"children":4815},{"className":4814},[],[4816],{"type":51,"value":2392},{"type":51,"value":4818}," object is permissive, so a misspelled\u002Fsnake_case key is silently dropped.)",{"type":46,"tag":557,"props":4820,"children":4821},{},[4822,4827,4829,4835,4836,4841,4843,4848],{"type":46,"tag":67,"props":4823,"children":4824},{},[4825],{"type":51,"value":4826},"Permission-gated:",{"type":51,"value":4828}," the querier's role must permit manually-written SQL. Without it the job fails — ",{"type":46,"tag":75,"props":4830,"children":4832},{"className":4831},[],[4833],{"type":51,"value":4834},"error_type: \"FORBIDDEN\"",{"type":51,"value":616},{"type":46,"tag":353,"props":4837,"children":4838},{},[4839],{"type":51,"value":4840},"\"queries based on manually written SQL are restricted\"",{"type":51,"value":4842}," — returned as ",{"type":46,"tag":67,"props":4844,"children":4845},{},[4846],{"type":51,"value":4847},"HTTP 200 with the error in the job body",{"type":51,"value":4849},", not a 4xx.",{"type":46,"tag":557,"props":4851,"children":4852},{},[4853,4858,4860,4865,4867,4872,4874,4878,4879,4883,4885,4890],{"type":46,"tag":67,"props":4854,"children":4855},{},[4856],{"type":51,"value":4857},"Access behavior:",{"type":51,"value":4859}," raw SQL bypasses ",{"type":46,"tag":67,"props":4861,"children":4862},{},[4863],{"type":51,"value":4864},"all",{"type":51,"value":4866}," model controls — object-level ",{"type":46,"tag":67,"props":4868,"children":4869},{},[4870],{"type":51,"value":4871},"access grants",{"type":51,"value":4873},", row-level ",{"type":46,"tag":67,"props":4875,"children":4876},{},[4877],{"type":51,"value":1267},{"type":51,"value":942},{"type":46,"tag":67,"props":4880,"children":4881},{},[4882],{"type":51,"value":1274},{"type":51,"value":4884}," — and is invisible to Viewer\u002FRestricted Querier roles in a dashboard. It's the most permissive pathway; use only for ad-hoc reads by privileged users, and ",{"type":46,"tag":67,"props":4886,"children":4887},{},[4888],{"type":51,"value":4889},"strip it from any reused\u002Fdashboard query",{"type":51,"value":4891}," (see \"Using Job Results in a Dashboard\").",{"type":46,"tag":557,"props":4893,"children":4894},{},[4895,4900,4902,4907,4909,4914,4916,4920,4922,4928],{"type":46,"tag":67,"props":4896,"children":4897},{},[4898],{"type":51,"value":4899},"Row cap:",{"type":51,"value":4901}," an unbounded raw query is capped at ",{"type":46,"tag":67,"props":4903,"children":4904},{},[4905],{"type":51,"value":4906},"50,000 rows",{"type":51,"value":4908}," (the response returns 50,001 — the cap plus one truncation sentinel). The envelope ",{"type":46,"tag":75,"props":4910,"children":4912},{"className":4911},[],[4913],{"type":51,"value":770},{"type":51,"value":4915}," is ",{"type":46,"tag":67,"props":4917,"children":4918},{},[4919],{"type":51,"value":1077},{"type":51,"value":4921}," applied to raw SQL; put ",{"type":46,"tag":75,"props":4923,"children":4925},{"className":4924},[],[4926],{"type":51,"value":4927},"LIMIT",{"type":51,"value":4929}," in the SQL itself to bound results.",{"type":46,"tag":84,"props":4931,"children":4933},{"id":4932},"request-level-options-outside-query",[4934,4936,4941],{"type":51,"value":4935},"Request-level options (outside ",{"type":46,"tag":75,"props":4937,"children":4939},{"className":4938},[],[4940],{"type":51,"value":2392},{"type":51,"value":2608},{"type":46,"tag":54,"props":4943,"children":4944},{},[4945,4947,4952,4954,4959],{"type":51,"value":4946},"These keys sit at the ",{"type":46,"tag":67,"props":4948,"children":4949},{},[4950],{"type":51,"value":4951},"top level",{"type":51,"value":4953}," of the body, beside ",{"type":46,"tag":75,"props":4955,"children":4957},{"className":4956},[],[4958],{"type":51,"value":2392},{"type":51,"value":4960},", not inside it:",{"type":46,"tag":996,"props":4962,"children":4963},{},[4964,4979],{"type":46,"tag":1474,"props":4965,"children":4966},{},[4967],{"type":46,"tag":1478,"props":4968,"children":4969},{},[4970,4975],{"type":46,"tag":1482,"props":4971,"children":4972},{},[4973],{"type":51,"value":4974},"Option",{"type":46,"tag":1482,"props":4976,"children":4977},{},[4978],{"type":51,"value":1496},{"type":46,"tag":1498,"props":4980,"children":4981},{},[4982,5020,5058,5083,5107,5137,5176],{"type":46,"tag":1478,"props":4983,"children":4984},{},[4985,4994],{"type":46,"tag":1505,"props":4986,"children":4987},{},[4988],{"type":46,"tag":75,"props":4989,"children":4991},{"className":4990},[],[4992],{"type":51,"value":4993},"resultType",{"type":46,"tag":1505,"props":4995,"children":4996},{},[4997,4999,5005,5006,5012,5013,5018],{"type":51,"value":4998},"Output format: ",{"type":46,"tag":75,"props":5000,"children":5002},{"className":5001},[],[5003],{"type":51,"value":5004},"csv",{"type":51,"value":616},{"type":46,"tag":75,"props":5007,"children":5009},{"className":5008},[],[5010],{"type":51,"value":5011},"xlsx",{"type":51,"value":665},{"type":46,"tag":75,"props":5014,"children":5016},{"className":5015},[],[5017],{"type":51,"value":1753},{"type":51,"value":5019},". Omit for the default base64 Arrow response.",{"type":46,"tag":1478,"props":5021,"children":5022},{},[5023,5032],{"type":46,"tag":1505,"props":5024,"children":5025},{},[5026],{"type":46,"tag":75,"props":5027,"children":5029},{"className":5028},[],[5030],{"type":51,"value":5031},"cache",{"type":46,"tag":1505,"props":5033,"children":5034},{},[5035,5037,5043,5044,5050,5051,5057],{"type":51,"value":5036},"Cache policy: ",{"type":46,"tag":75,"props":5038,"children":5040},{"className":5039},[],[5041],{"type":51,"value":5042},"Standard",{"type":51,"value":616},{"type":46,"tag":75,"props":5045,"children":5047},{"className":5046},[],[5048],{"type":51,"value":5049},"SkipRequery",{"type":51,"value":616},{"type":46,"tag":75,"props":5052,"children":5054},{"className":5053},[],[5055],{"type":51,"value":5056},"SkipCache",{"type":51,"value":386},{"type":46,"tag":1478,"props":5059,"children":5060},{},[5061,5070],{"type":46,"tag":1505,"props":5062,"children":5063},{},[5064],{"type":46,"tag":75,"props":5065,"children":5067},{"className":5066},[],[5068],{"type":51,"value":5069},"userId",{"type":46,"tag":1505,"props":5071,"children":5072},{},[5073,5075,5081],{"type":51,"value":5074},"Run as another user (org-scoped API keys); also the ",{"type":46,"tag":75,"props":5076,"children":5078},{"className":5077},[],[5079],{"type":51,"value":5080},"--userid",{"type":51,"value":5082}," flag.",{"type":46,"tag":1478,"props":5084,"children":5085},{},[5086,5095],{"type":46,"tag":1505,"props":5087,"children":5088},{},[5089],{"type":46,"tag":75,"props":5090,"children":5092},{"className":5091},[],[5093],{"type":51,"value":5094},"branchId",{"type":46,"tag":1505,"props":5096,"children":5097},{},[5098,5100,5105],{"type":51,"value":5099},"Run against a model ",{"type":46,"tag":67,"props":5101,"children":5102},{},[5103],{"type":51,"value":5104},"branch",{"type":51,"value":5106}," (validate draft model changes on live data). Must be a branch of the same shared model.",{"type":46,"tag":1478,"props":5108,"children":5109},{},[5110,5119],{"type":46,"tag":1505,"props":5111,"children":5112},{},[5113],{"type":46,"tag":75,"props":5114,"children":5116},{"className":5115},[],[5117],{"type":51,"value":5118},"planOnly",{"type":46,"tag":1505,"props":5120,"children":5121},{},[5122,5124,5129,5131,5136],{"type":51,"value":5123},"Return the execution plan ",{"type":46,"tag":67,"props":5125,"children":5126},{},[5127],{"type":51,"value":5128},"without running",{"type":51,"value":5130}," the query (validate\u002Fdebug at no warehouse cost). Cannot combine with ",{"type":46,"tag":75,"props":5132,"children":5134},{"className":5133},[],[5135],{"type":51,"value":4993},{"type":51,"value":386},{"type":46,"tag":1478,"props":5138,"children":5139},{},[5140,5149],{"type":46,"tag":1505,"props":5141,"children":5142},{},[5143],{"type":46,"tag":75,"props":5144,"children":5146},{"className":5145},[],[5147],{"type":51,"value":5148},"formatResults",{"type":46,"tag":1505,"props":5150,"children":5151},{},[5152,5154,5159,5161,5167,5169,5174],{"type":51,"value":5153},"On exports, emit ",{"type":46,"tag":67,"props":5155,"children":5156},{},[5157],{"type":51,"value":5158},"formatted",{"type":51,"value":5160}," values (e.g. ",{"type":46,"tag":75,"props":5162,"children":5164},{"className":5163},[],[5165],{"type":51,"value":5166},"$1,234.56",{"type":51,"value":5168},") vs. raw. Requires ",{"type":46,"tag":75,"props":5170,"children":5172},{"className":5171},[],[5173],{"type":51,"value":4993},{"type":51,"value":5175},"; ignored for Arrow.",{"type":46,"tag":1478,"props":5177,"children":5178},{},[5179,5188],{"type":46,"tag":1505,"props":5180,"children":5181},{},[5182],{"type":46,"tag":75,"props":5183,"children":5185},{"className":5184},[],[5186],{"type":51,"value":5187},"timezone",{"type":46,"tag":1505,"props":5189,"children":5190},{},[5191,5193,5199,5200,5205,5207,5213],{"type":51,"value":5192},"Per-request timezone override (IANA id). Requires the connection setting ",{"type":46,"tag":75,"props":5194,"children":5196},{"className":5195},[],[5197],{"type":51,"value":5198},"allowsUserSpecificTimezones",{"type":51,"value":720},{"type":46,"tag":67,"props":5201,"children":5202},{},[5203],{"type":51,"value":5204},"and",{"type":51,"value":5206}," the org setting ",{"type":46,"tag":75,"props":5208,"children":5210},{"className":5209},[],[5211],{"type":51,"value":5212},"allowsDocumentCanUseTimezoneOverride",{"type":51,"value":5214},"; silently no-ops if either is off.",{"type":46,"tag":84,"props":5216,"children":5218},{"id":5217},"handling-and-validating-results",[5219],{"type":51,"value":5220},"Handling and Validating Results",{"type":46,"tag":54,"props":5222,"children":5223},{},[5224,5226,5232],{"type":51,"value":5225},"Default response: base64-encoded Apache Arrow table. Arrow results are binary — you cannot parse individual row data from the raw response. To verify a query returned data, check ",{"type":46,"tag":75,"props":5227,"children":5229},{"className":5228},[],[5230],{"type":51,"value":5231},"summary.row_count",{"type":51,"value":5233}," in the response.",{"type":46,"tag":54,"props":5235,"children":5236},{},[5237,5239,5248,5249,5258],{"type":51,"value":5238},"To read the results yourself (to validate or spot-check), request ",{"type":46,"tag":67,"props":5240,"children":5241},{},[5242],{"type":46,"tag":75,"props":5243,"children":5245},{"className":5244},[],[5246],{"type":51,"value":5247},"resultType: \"csv\"",{"type":51,"value":313},{"type":46,"tag":67,"props":5250,"children":5251},{},[5252],{"type":46,"tag":75,"props":5253,"children":5255},{"className":5254},[],[5256],{"type":51,"value":5257},"\"json\"",{"type":51,"value":5259}," — both come back as text you can parse directly:",{"type":46,"tag":91,"props":5261,"children":5263},{"className":1751,"code":5262,"language":1753,"meta":96,"style":96},"{ \"query\": { ... }, \"resultType\": \"csv\" }\n",[5264],{"type":46,"tag":75,"props":5265,"children":5266},{"__ignoreMap":96},[5267],{"type":46,"tag":102,"props":5268,"children":5269},{"class":104,"line":105},[5270,5275,5279,5283,5287,5291,5296,5301,5306,5310,5314,5318,5322,5326,5330,5334],{"type":46,"tag":102,"props":5271,"children":5272},{"style":144},[5273],{"type":51,"value":5274},"{",{"type":46,"tag":102,"props":5276,"children":5277},{"style":144},[5278],{"type":51,"value":167},{"type":46,"tag":102,"props":5280,"children":5281},{"style":1798},[5282],{"type":51,"value":2392},{"type":46,"tag":102,"props":5284,"children":5285},{"style":144},[5286],{"type":51,"value":1765},{"type":46,"tag":102,"props":5288,"children":5289},{"style":144},[5290],{"type":51,"value":1810},{"type":46,"tag":102,"props":5292,"children":5293},{"style":144},[5294],{"type":51,"value":5295}," {",{"type":46,"tag":102,"props":5297,"children":5298},{"style":248},[5299],{"type":51,"value":5300}," ... ",{"type":46,"tag":102,"props":5302,"children":5303},{"style":144},[5304],{"type":51,"value":5305},"},",{"type":46,"tag":102,"props":5307,"children":5308},{"style":144},[5309],{"type":51,"value":167},{"type":46,"tag":102,"props":5311,"children":5312},{"style":1798},[5313],{"type":51,"value":4993},{"type":46,"tag":102,"props":5315,"children":5316},{"style":144},[5317],{"type":51,"value":1765},{"type":46,"tag":102,"props":5319,"children":5320},{"style":144},[5321],{"type":51,"value":1810},{"type":46,"tag":102,"props":5323,"children":5324},{"style":144},[5325],{"type":51,"value":167},{"type":46,"tag":102,"props":5327,"children":5328},{"style":133},[5329],{"type":51,"value":5004},{"type":46,"tag":102,"props":5331,"children":5332},{"style":144},[5333],{"type":51,"value":1765},{"type":46,"tag":102,"props":5335,"children":5336},{"style":144},[5337],{"type":51,"value":1855},{"type":46,"tag":54,"props":5339,"children":5340},{},[5341,5347,5349,5354,5355,5361,5363,5368,5370,5375,5376,5381],{"type":46,"tag":75,"props":5342,"children":5344},{"className":5343},[],[5345],{"type":51,"value":5346},"resultType: \"xlsx\"",{"type":51,"value":5348}," is also valid, but it returns a ",{"type":46,"tag":67,"props":5350,"children":5351},{},[5352],{"type":51,"value":5353},"binary",{"type":51,"value":720},{"type":46,"tag":75,"props":5356,"children":5358},{"className":5357},[],[5359],{"type":51,"value":5360},".xlsx",{"type":51,"value":5362}," file (zip-based) — like the default Arrow blob, you can't read it inline without a spreadsheet app or a library. Use it only to ",{"type":46,"tag":67,"props":5364,"children":5365},{},[5366],{"type":51,"value":5367},"deliver a file",{"type":51,"value":5369}," to a person, not to inspect results. For agent-side reading, stick to ",{"type":46,"tag":75,"props":5371,"children":5373},{"className":5372},[],[5374],{"type":51,"value":5004},{"type":51,"value":764},{"type":46,"tag":75,"props":5377,"children":5379},{"className":5378},[],[5380],{"type":51,"value":1753},{"type":51,"value":386},{"type":46,"tag":1323,"props":5383,"children":5385},{"id":5384},"result-validation",[5386],{"type":51,"value":5387},"Result Validation",{"type":46,"tag":54,"props":5389,"children":5390},{},[5391],{"type":51,"value":5392},"Every query response should be checked before trusting the results or presenting them to the user.",{"type":46,"tag":54,"props":5394,"children":5395},{},[5396],{"type":46,"tag":67,"props":5397,"children":5398},{},[5399],{"type":51,"value":5400},"Check for errors:",{"type":46,"tag":553,"props":5402,"children":5403},{},[5404,5417],{"type":46,"tag":557,"props":5405,"children":5406},{},[5407,5409,5415],{"type":51,"value":5408},"If the response contains an ",{"type":46,"tag":75,"props":5410,"children":5412},{"className":5411},[],[5413],{"type":51,"value":5414},"error",{"type":51,"value":5416}," key, the query failed. Common causes: bad field name, missing join path, malformed filter expression, permission error.",{"type":46,"tag":557,"props":5418,"children":5419},{},[5420,5422,5428,5430,5436],{"type":51,"value":5421},"If the response contains ",{"type":46,"tag":75,"props":5423,"children":5425},{"className":5424},[],[5426],{"type":51,"value":5427},"remaining_job_ids",{"type":51,"value":5429},", the query is still running — poll with ",{"type":46,"tag":75,"props":5431,"children":5433},{"className":5432},[],[5434],{"type":51,"value":5435},"omni query wait",{"type":51,"value":5437}," before checking results.",{"type":46,"tag":54,"props":5439,"children":5440},{},[5441],{"type":46,"tag":67,"props":5442,"children":5443},{},[5444],{"type":51,"value":5445},"Check row count:",{"type":46,"tag":553,"props":5447,"children":5448},{},[5449,5460],{"type":46,"tag":557,"props":5450,"children":5451},{},[5452,5458],{"type":46,"tag":75,"props":5453,"children":5455},{"className":5454},[],[5456],{"type":51,"value":5457},"summary.row_count == 0",{"type":51,"value":5459}," — the query returned no data. This may be valid (e.g., no data in the filter range) but is worth flagging to the user. Common causes: overly restrictive filters, wrong date range, field that doesn't match any rows.",{"type":46,"tag":557,"props":5461,"children":5462},{},[5463,5468,5470,5475,5477,5482],{"type":46,"tag":75,"props":5464,"children":5466},{"className":5465},[],[5467],{"type":51,"value":5231},{"type":51,"value":5469}," equals the ",{"type":46,"tag":75,"props":5471,"children":5473},{"className":5472},[],[5474],{"type":51,"value":770},{"type":51,"value":5476}," you set — results may be truncated. If the user needs complete data, re-run with a higher limit or ",{"type":46,"tag":75,"props":5478,"children":5480},{"className":5479},[],[5481],{"type":51,"value":1649},{"type":51,"value":5483}," for unlimited.",{"type":46,"tag":54,"props":5485,"children":5486},{},[5487],{"type":46,"tag":67,"props":5488,"children":5489},{},[5490],{"type":51,"value":5491},"Spot-check data with CSV:",{"type":46,"tag":54,"props":5493,"children":5494},{},[5495],{"type":51,"value":5496},"When accuracy matters, request CSV and scan the output:",{"type":46,"tag":91,"props":5498,"children":5500},{"className":93,"code":5499,"language":95,"meta":96,"style":96},"omni query run --body '{\n  \"query\": { ... },\n  \"resultType\": \"csv\"\n}'\n",[5501],{"type":46,"tag":75,"props":5502,"children":5503},{"__ignoreMap":96},[5504,5531,5539,5547],{"type":46,"tag":102,"props":5505,"children":5506},{"class":104,"line":105},[5507,5511,5515,5519,5523,5527],{"type":46,"tag":102,"props":5508,"children":5509},{"style":198},[5510],{"type":51,"value":15},{"type":46,"tag":102,"props":5512,"children":5513},{"style":133},[5514],{"type":51,"value":429},{"type":46,"tag":102,"props":5516,"children":5517},{"style":133},[5518],{"type":51,"value":455},{"type":46,"tag":102,"props":5520,"children":5521},{"style":133},[5522],{"type":51,"value":1355},{"type":46,"tag":102,"props":5524,"children":5525},{"style":144},[5526],{"type":51,"value":1360},{"type":46,"tag":102,"props":5528,"children":5529},{"style":133},[5530],{"type":51,"value":1365},{"type":46,"tag":102,"props":5532,"children":5533},{"class":104,"line":115},[5534],{"type":46,"tag":102,"props":5535,"children":5536},{"style":133},[5537],{"type":51,"value":5538},"  \"query\": { ... },\n",{"type":46,"tag":102,"props":5540,"children":5541},{"class":104,"line":33},[5542],{"type":46,"tag":102,"props":5543,"children":5544},{"style":133},[5545],{"type":51,"value":5546},"  \"resultType\": \"csv\"\n",{"type":46,"tag":102,"props":5548,"children":5549},{"class":104,"line":221},[5550,5554],{"type":46,"tag":102,"props":5551,"children":5552},{"style":133},[5553],{"type":51,"value":1458},{"type":46,"tag":102,"props":5555,"children":5556},{"style":144},[5557],{"type":51,"value":1463},{"type":46,"tag":54,"props":5559,"children":5560},{},[5561],{"type":51,"value":5562},"Check that:",{"type":46,"tag":553,"props":5564,"children":5565},{},[5566,5571,5576],{"type":46,"tag":557,"props":5567,"children":5568},{},[5569],{"type":51,"value":5570},"Column headers match the fields you requested",{"type":46,"tag":557,"props":5572,"children":5573},{},[5574],{"type":51,"value":5575},"Values are in expected ranges (e.g., revenue isn't negative, dates aren't in the future)",{"type":46,"tag":557,"props":5577,"children":5578},{},[5579],{"type":51,"value":5580},"Aggregations make sense (e.g., a count isn't returning a sum)",{"type":46,"tag":54,"props":5582,"children":5583},{},[5584],{"type":46,"tag":67,"props":5585,"children":5586},{},[5587],{"type":51,"value":5588},"Validate filter behavior:",{"type":46,"tag":54,"props":5590,"children":5591},{},[5592],{"type":51,"value":5593},"If your query includes filters, verify they're being applied:",{"type":46,"tag":91,"props":5595,"children":5597},{"className":93,"code":5596,"language":95,"meta":96,"style":96},"# Run the same query without filters\nomni query run --body '{ \"query\": { ... (no filters) ... }, \"resultType\": \"csv\" }'\n\n# Compare row counts — filtered should be \u003C= unfiltered\n",[5598],{"type":46,"tag":75,"props":5599,"children":5600},{"__ignoreMap":96},[5601,5609,5641,5648],{"type":46,"tag":102,"props":5602,"children":5603},{"class":104,"line":105},[5604],{"type":46,"tag":102,"props":5605,"children":5606},{"style":109},[5607],{"type":51,"value":5608},"# Run the same query without filters\n",{"type":46,"tag":102,"props":5610,"children":5611},{"class":104,"line":115},[5612,5616,5620,5624,5628,5632,5637],{"type":46,"tag":102,"props":5613,"children":5614},{"style":198},[5615],{"type":51,"value":15},{"type":46,"tag":102,"props":5617,"children":5618},{"style":133},[5619],{"type":51,"value":429},{"type":46,"tag":102,"props":5621,"children":5622},{"style":133},[5623],{"type":51,"value":455},{"type":46,"tag":102,"props":5625,"children":5626},{"style":133},[5627],{"type":51,"value":1355},{"type":46,"tag":102,"props":5629,"children":5630},{"style":144},[5631],{"type":51,"value":1360},{"type":46,"tag":102,"props":5633,"children":5634},{"style":133},[5635],{"type":51,"value":5636},"{ \"query\": { ... (no filters) ... }, \"resultType\": \"csv\" }",{"type":46,"tag":102,"props":5638,"children":5639},{"style":144},[5640],{"type":51,"value":1463},{"type":46,"tag":102,"props":5642,"children":5643},{"class":104,"line":33},[5644],{"type":46,"tag":102,"props":5645,"children":5646},{"emptyLinePlaceholder":263},[5647],{"type":51,"value":266},{"type":46,"tag":102,"props":5649,"children":5650},{"class":104,"line":221},[5651],{"type":46,"tag":102,"props":5652,"children":5653},{"style":109},[5654],{"type":51,"value":5655},"# Compare row counts — filtered should be \u003C= unfiltered\n",{"type":46,"tag":54,"props":5657,"children":5658},{},[5659],{"type":51,"value":5660},"If both queries return the same row count, the filter may not be binding (wrong field name, unsupported expression, or the known bug where boolean filters are dropped with pivots).",{"type":46,"tag":1323,"props":5662,"children":5664},{"id":5663},"validation-checklist",[5665],{"type":51,"value":5666},"Validation Checklist",{"type":46,"tag":996,"props":5668,"children":5669},{},[5670,5691],{"type":46,"tag":1474,"props":5671,"children":5672},{},[5673],{"type":46,"tag":1478,"props":5674,"children":5675},{},[5676,5681,5686],{"type":46,"tag":1482,"props":5677,"children":5678},{},[5679],{"type":51,"value":5680},"Check",{"type":46,"tag":1482,"props":5682,"children":5683},{},[5684],{"type":51,"value":5685},"How",{"type":46,"tag":1482,"props":5687,"children":5688},{},[5689],{"type":51,"value":5690},"When",{"type":46,"tag":1498,"props":5692,"children":5693},{},[5694,5719,5740,5762,5780,5798,5816],{"type":46,"tag":1478,"props":5695,"children":5696},{},[5697,5702,5714],{"type":46,"tag":1505,"props":5698,"children":5699},{},[5700],{"type":51,"value":5701},"No error in response",{"type":46,"tag":1505,"props":5703,"children":5704},{},[5705,5707,5712],{"type":51,"value":5706},"Check for ",{"type":46,"tag":75,"props":5708,"children":5710},{"className":5709},[],[5711],{"type":51,"value":5414},{"type":51,"value":5713}," key",{"type":46,"tag":1505,"props":5715,"children":5716},{},[5717],{"type":51,"value":5718},"Every query",{"type":46,"tag":1478,"props":5720,"children":5721},{},[5722,5727,5736],{"type":46,"tag":1505,"props":5723,"children":5724},{},[5725],{"type":51,"value":5726},"Data was returned",{"type":46,"tag":1505,"props":5728,"children":5729},{},[5730],{"type":46,"tag":75,"props":5731,"children":5733},{"className":5732},[],[5734],{"type":51,"value":5735},"summary.row_count > 0",{"type":46,"tag":1505,"props":5737,"children":5738},{},[5739],{"type":51,"value":5718},{"type":46,"tag":1478,"props":5741,"children":5742},{},[5743,5748,5757],{"type":46,"tag":1505,"props":5744,"children":5745},{},[5746],{"type":51,"value":5747},"Results not truncated",{"type":46,"tag":1505,"props":5749,"children":5750},{},[5751],{"type":46,"tag":75,"props":5752,"children":5754},{"className":5753},[],[5755],{"type":51,"value":5756},"row_count \u003C limit",{"type":46,"tag":1505,"props":5758,"children":5759},{},[5760],{"type":51,"value":5761},"When completeness matters",{"type":46,"tag":1478,"props":5763,"children":5764},{},[5765,5770,5775],{"type":46,"tag":1505,"props":5766,"children":5767},{},[5768],{"type":51,"value":5769},"Columns are correct",{"type":46,"tag":1505,"props":5771,"children":5772},{},[5773],{"type":51,"value":5774},"CSV column headers match requested fields",{"type":46,"tag":1505,"props":5776,"children":5777},{},[5778],{"type":51,"value":5779},"When building dashboards or reports",{"type":46,"tag":1478,"props":5781,"children":5782},{},[5783,5788,5793],{"type":46,"tag":1505,"props":5784,"children":5785},{},[5786],{"type":51,"value":5787},"Values are reasonable",{"type":46,"tag":1505,"props":5789,"children":5790},{},[5791],{"type":51,"value":5792},"Spot-check CSV output",{"type":46,"tag":1505,"props":5794,"children":5795},{},[5796],{"type":51,"value":5797},"When presenting to users",{"type":46,"tag":1478,"props":5799,"children":5800},{},[5801,5806,5811],{"type":46,"tag":1505,"props":5802,"children":5803},{},[5804],{"type":51,"value":5805},"Filters are applied",{"type":46,"tag":1505,"props":5807,"children":5808},{},[5809],{"type":51,"value":5810},"Compare filtered vs unfiltered row counts",{"type":46,"tag":1505,"props":5812,"children":5813},{},[5814],{"type":51,"value":5815},"When using filters",{"type":46,"tag":1478,"props":5817,"children":5818},{},[5819,5824,5836],{"type":46,"tag":1505,"props":5820,"children":5821},{},[5822],{"type":51,"value":5823},"Long-running query completed",{"type":46,"tag":1505,"props":5825,"children":5826},{},[5827,5829,5834],{"type":51,"value":5828},"No ",{"type":46,"tag":75,"props":5830,"children":5832},{"className":5831},[],[5833],{"type":51,"value":5427},{"type":51,"value":5835}," in final response",{"type":46,"tag":1505,"props":5837,"children":5838},{},[5839],{"type":51,"value":5840},"Queries on large tables",{"type":46,"tag":1323,"props":5842,"children":5844},{"id":5843},"decoding-arrow-results",[5845],{"type":51,"value":5846},"Decoding Arrow Results",{"type":46,"tag":91,"props":5848,"children":5852},{"className":5849,"code":5850,"language":5851,"meta":96,"style":96},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import base64, pyarrow as pa\narrow_bytes = base64.b64decode(response[\"data\"])\nreader = pa.ipc.open_stream(arrow_bytes)\ndf = reader.read_all().to_pandas()\n","python",[5853],{"type":46,"tag":75,"props":5854,"children":5855},{"__ignoreMap":96},[5856,5864,5872,5880],{"type":46,"tag":102,"props":5857,"children":5858},{"class":104,"line":105},[5859],{"type":46,"tag":102,"props":5860,"children":5861},{},[5862],{"type":51,"value":5863},"import base64, pyarrow as pa\n",{"type":46,"tag":102,"props":5865,"children":5866},{"class":104,"line":115},[5867],{"type":46,"tag":102,"props":5868,"children":5869},{},[5870],{"type":51,"value":5871},"arrow_bytes = base64.b64decode(response[\"data\"])\n",{"type":46,"tag":102,"props":5873,"children":5874},{"class":104,"line":33},[5875],{"type":46,"tag":102,"props":5876,"children":5877},{},[5878],{"type":51,"value":5879},"reader = pa.ipc.open_stream(arrow_bytes)\n",{"type":46,"tag":102,"props":5881,"children":5882},{"class":104,"line":221},[5883],{"type":46,"tag":102,"props":5884,"children":5885},{},[5886],{"type":51,"value":5887},"df = reader.read_all().to_pandas()\n",{"type":46,"tag":1323,"props":5889,"children":5891},{"id":5890},"long-running-queries",[5892],{"type":51,"value":5893},"Long-Running Queries",{"type":46,"tag":54,"props":5895,"children":5896},{},[5897,5899,5904],{"type":51,"value":5898},"If the response includes ",{"type":46,"tag":75,"props":5900,"children":5902},{"className":5901},[],[5903],{"type":51,"value":5427},{"type":51,"value":5905},", poll until complete:",{"type":46,"tag":91,"props":5907,"children":5909},{"className":93,"code":5908,"language":95,"meta":96,"style":96},"omni query wait --jobids job-id-1,job-id-2\n",[5910],{"type":46,"tag":75,"props":5911,"children":5912},{"__ignoreMap":96},[5913],{"type":46,"tag":102,"props":5914,"children":5915},{"class":104,"line":105},[5916,5920,5924,5929,5934],{"type":46,"tag":102,"props":5917,"children":5918},{"style":198},[5919],{"type":51,"value":15},{"type":46,"tag":102,"props":5921,"children":5922},{"style":133},[5923],{"type":51,"value":429},{"type":46,"tag":102,"props":5925,"children":5926},{"style":133},[5927],{"type":51,"value":5928}," wait",{"type":46,"tag":102,"props":5930,"children":5931},{"style":133},[5932],{"type":51,"value":5933}," --jobids",{"type":46,"tag":102,"props":5935,"children":5936},{"style":133},[5937],{"type":51,"value":5938}," job-id-1,job-id-2\n",{"type":46,"tag":84,"props":5940,"children":5942},{"id":5941},"running-queries-from-dashboards",[5943],{"type":51,"value":5944},"Running Queries from Dashboards",{"type":46,"tag":54,"props":5946,"children":5947},{},[5948],{"type":51,"value":5949},"Extract and re-run queries powering existing dashboards:",{"type":46,"tag":91,"props":5951,"children":5953},{"className":93,"code":5952,"language":95,"meta":96,"style":96},"# Get all queries from a dashboard\nomni documents get-queries \u003CdashboardId>\n\n# Run as a specific user\nomni query run --body '{ \"query\": { ... }, \"userId\": \"user-uuid-here\" }'\n\n# Cache policy (valid values: Standard, SkipRequery, SkipCache)\nomni query run --body '{ \"query\": { ... }, \"cache\": \"SkipCache\" }'\n",[5954],{"type":46,"tag":75,"props":5955,"children":5956},{"__ignoreMap":96},[5957,5965,6000,6007,6015,6047,6054,6062],{"type":46,"tag":102,"props":5958,"children":5959},{"class":104,"line":105},[5960],{"type":46,"tag":102,"props":5961,"children":5962},{"style":109},[5963],{"type":51,"value":5964},"# Get all queries from a dashboard\n",{"type":46,"tag":102,"props":5966,"children":5967},{"class":104,"line":115},[5968,5972,5977,5982,5986,5991,5996],{"type":46,"tag":102,"props":5969,"children":5970},{"style":198},[5971],{"type":51,"value":15},{"type":46,"tag":102,"props":5973,"children":5974},{"style":133},[5975],{"type":51,"value":5976}," documents",{"type":46,"tag":102,"props":5978,"children":5979},{"style":133},[5980],{"type":51,"value":5981}," get-queries",{"type":46,"tag":102,"props":5983,"children":5984},{"style":144},[5985],{"type":51,"value":240},{"type":46,"tag":102,"props":5987,"children":5988},{"style":133},[5989],{"type":51,"value":5990},"dashboardI",{"type":46,"tag":102,"props":5992,"children":5993},{"style":248},[5994],{"type":51,"value":5995},"d",{"type":46,"tag":102,"props":5997,"children":5998},{"style":144},[5999],{"type":51,"value":256},{"type":46,"tag":102,"props":6001,"children":6002},{"class":104,"line":33},[6003],{"type":46,"tag":102,"props":6004,"children":6005},{"emptyLinePlaceholder":263},[6006],{"type":51,"value":266},{"type":46,"tag":102,"props":6008,"children":6009},{"class":104,"line":221},[6010],{"type":46,"tag":102,"props":6011,"children":6012},{"style":109},[6013],{"type":51,"value":6014},"# Run as a specific user\n",{"type":46,"tag":102,"props":6016,"children":6017},{"class":104,"line":259},[6018,6022,6026,6030,6034,6038,6043],{"type":46,"tag":102,"props":6019,"children":6020},{"style":198},[6021],{"type":51,"value":15},{"type":46,"tag":102,"props":6023,"children":6024},{"style":133},[6025],{"type":51,"value":429},{"type":46,"tag":102,"props":6027,"children":6028},{"style":133},[6029],{"type":51,"value":455},{"type":46,"tag":102,"props":6031,"children":6032},{"style":133},[6033],{"type":51,"value":1355},{"type":46,"tag":102,"props":6035,"children":6036},{"style":144},[6037],{"type":51,"value":1360},{"type":46,"tag":102,"props":6039,"children":6040},{"style":133},[6041],{"type":51,"value":6042},"{ \"query\": { ... }, \"userId\": \"user-uuid-here\" }",{"type":46,"tag":102,"props":6044,"children":6045},{"style":144},[6046],{"type":51,"value":1463},{"type":46,"tag":102,"props":6048,"children":6049},{"class":104,"line":269},[6050],{"type":46,"tag":102,"props":6051,"children":6052},{"emptyLinePlaceholder":263},[6053],{"type":51,"value":266},{"type":46,"tag":102,"props":6055,"children":6056},{"class":104,"line":278},[6057],{"type":46,"tag":102,"props":6058,"children":6059},{"style":109},[6060],{"type":51,"value":6061},"# Cache policy (valid values: Standard, SkipRequery, SkipCache)\n",{"type":46,"tag":102,"props":6063,"children":6064},{"class":104,"line":1416},[6065,6069,6073,6077,6081,6085,6090],{"type":46,"tag":102,"props":6066,"children":6067},{"style":198},[6068],{"type":51,"value":15},{"type":46,"tag":102,"props":6070,"children":6071},{"style":133},[6072],{"type":51,"value":429},{"type":46,"tag":102,"props":6074,"children":6075},{"style":133},[6076],{"type":51,"value":455},{"type":46,"tag":102,"props":6078,"children":6079},{"style":133},[6080],{"type":51,"value":1355},{"type":46,"tag":102,"props":6082,"children":6083},{"style":144},[6084],{"type":51,"value":1360},{"type":46,"tag":102,"props":6086,"children":6087},{"style":133},[6088],{"type":51,"value":6089},"{ \"query\": { ... }, \"cache\": \"SkipCache\" }",{"type":46,"tag":102,"props":6091,"children":6092},{"style":144},[6093],{"type":51,"value":1463},{"type":46,"tag":84,"props":6095,"children":6097},{"id":6096},"ai-powered-query-generation",[6098],{"type":51,"value":6099},"AI-Powered Query Generation",{"type":46,"tag":54,"props":6101,"children":6102},{},[6103],{"type":51,"value":6104},"Instead of constructing query JSON manually, you can describe what you want in natural language and let Omni's AI generate the query.",{"type":46,"tag":1323,"props":6106,"children":6108},{"id":6107},"generate-query-synchronous",[6109],{"type":51,"value":6110},"Generate Query (synchronous)",{"type":46,"tag":54,"props":6112,"children":6113},{},[6114,6116,6122],{"type":51,"value":6115},"The fastest path — returns a generated query JSON synchronously. Pass ",{"type":46,"tag":75,"props":6117,"children":6119},{"className":6118},[],[6120],{"type":51,"value":6121},"--run-query false",{"type":51,"value":6123}," to get only the query structure without executing it (default runs the query).",{"type":46,"tag":91,"props":6125,"children":6127},{"className":93,"code":6126,"language":95,"meta":96,"style":96},"# Just generate the query JSON (no execution)\nomni ai generate-query your-model-id \"Show me revenue by month\" --run-query false\n",[6128],{"type":46,"tag":75,"props":6129,"children":6130},{"__ignoreMap":96},[6131,6139],{"type":46,"tag":102,"props":6132,"children":6133},{"class":104,"line":105},[6134],{"type":46,"tag":102,"props":6135,"children":6136},{"style":109},[6137],{"type":51,"value":6138},"# Just generate the query JSON (no execution)\n",{"type":46,"tag":102,"props":6140,"children":6141},{"class":104,"line":115},[6142,6146,6150,6155,6160,6164,6169,6173,6178],{"type":46,"tag":102,"props":6143,"children":6144},{"style":198},[6145],{"type":51,"value":15},{"type":46,"tag":102,"props":6147,"children":6148},{"style":133},[6149],{"type":51,"value":501},{"type":46,"tag":102,"props":6151,"children":6152},{"style":133},[6153],{"type":51,"value":6154}," generate-query",{"type":46,"tag":102,"props":6156,"children":6157},{"style":133},[6158],{"type":51,"value":6159}," your-model-id",{"type":46,"tag":102,"props":6161,"children":6162},{"style":144},[6163],{"type":51,"value":167},{"type":46,"tag":102,"props":6165,"children":6166},{"style":133},[6167],{"type":51,"value":6168},"Show me revenue by month",{"type":46,"tag":102,"props":6170,"children":6171},{"style":144},[6172],{"type":51,"value":1765},{"type":46,"tag":102,"props":6174,"children":6175},{"style":133},[6176],{"type":51,"value":6177}," --run-query",{"type":46,"tag":102,"props":6179,"children":6180},{"style":144},[6181],{"type":51,"value":6182}," false\n",{"type":46,"tag":54,"props":6184,"children":6185},{},[6186],{"type":51,"value":6187},"Response:",{"type":46,"tag":91,"props":6189,"children":6191},{"className":1751,"code":6190,"language":1753,"meta":96,"style":96},"{\n  \"query\": {\n    \"fields\": [\"order_items.created_at[month]\", \"order_items.total_revenue\"],\n    \"table\": \"order_items\",\n    \"filters\": {},\n    \"sorts\": [{\"column_name\": \"order_items.created_at[month]\", \"sort_descending\": false}],\n    \"limit\": 500\n  },\n  \"topic\": \"order_items\",\n  \"error\": null\n}\n",[6192],{"type":46,"tag":75,"props":6193,"children":6194},{"__ignoreMap":96},[6195,6202,6225,6280,6315,6339,6416,6440,6448,6484,6508],{"type":46,"tag":102,"props":6196,"children":6197},{"class":104,"line":105},[6198],{"type":46,"tag":102,"props":6199,"children":6200},{"style":144},[6201],{"type":51,"value":1365},{"type":46,"tag":102,"props":6203,"children":6204},{"class":104,"line":115},[6205,6209,6213,6217,6221],{"type":46,"tag":102,"props":6206,"children":6207},{"style":144},[6208],{"type":51,"value":1906},{"type":46,"tag":102,"props":6210,"children":6211},{"style":1798},[6212],{"type":51,"value":2392},{"type":46,"tag":102,"props":6214,"children":6215},{"style":144},[6216],{"type":51,"value":1765},{"type":46,"tag":102,"props":6218,"children":6219},{"style":144},[6220],{"type":51,"value":1810},{"type":46,"tag":102,"props":6222,"children":6223},{"style":144},[6224],{"type":51,"value":2165},{"type":46,"tag":102,"props":6226,"children":6227},{"class":104,"line":33},[6228,6232,6236,6240,6244,6248,6252,6256,6260,6264,6268,6272,6276],{"type":46,"tag":102,"props":6229,"children":6230},{"style":144},[6231],{"type":51,"value":2173},{"type":46,"tag":102,"props":6233,"children":6234},{"style":198},[6235],{"type":51,"value":1584},{"type":46,"tag":102,"props":6237,"children":6238},{"style":144},[6239],{"type":51,"value":1765},{"type":46,"tag":102,"props":6241,"children":6242},{"style":144},[6243],{"type":51,"value":1810},{"type":46,"tag":102,"props":6245,"children":6246},{"style":144},[6247],{"type":51,"value":2428},{"type":46,"tag":102,"props":6249,"children":6250},{"style":144},[6251],{"type":51,"value":1765},{"type":46,"tag":102,"props":6253,"children":6254},{"style":133},[6255],{"type":51,"value":2437},{"type":46,"tag":102,"props":6257,"children":6258},{"style":144},[6259],{"type":51,"value":1765},{"type":46,"tag":102,"props":6261,"children":6262},{"style":144},[6263],{"type":51,"value":1828},{"type":46,"tag":102,"props":6265,"children":6266},{"style":144},[6267],{"type":51,"value":167},{"type":46,"tag":102,"props":6269,"children":6270},{"style":133},[6271],{"type":51,"value":1819},{"type":46,"tag":102,"props":6273,"children":6274},{"style":144},[6275],{"type":51,"value":1765},{"type":46,"tag":102,"props":6277,"children":6278},{"style":144},[6279],{"type":51,"value":2479},{"type":46,"tag":102,"props":6281,"children":6282},{"class":104,"line":221},[6283,6287,6291,6295,6299,6303,6307,6311],{"type":46,"tag":102,"props":6284,"children":6285},{"style":144},[6286],{"type":51,"value":2173},{"type":46,"tag":102,"props":6288,"children":6289},{"style":198},[6290],{"type":51,"value":996},{"type":46,"tag":102,"props":6292,"children":6293},{"style":144},[6294],{"type":51,"value":1765},{"type":46,"tag":102,"props":6296,"children":6297},{"style":144},[6298],{"type":51,"value":1810},{"type":46,"tag":102,"props":6300,"children":6301},{"style":144},[6302],{"type":51,"value":167},{"type":46,"tag":102,"props":6304,"children":6305},{"style":133},[6306],{"type":51,"value":1056},{"type":46,"tag":102,"props":6308,"children":6309},{"style":144},[6310],{"type":51,"value":1765},{"type":46,"tag":102,"props":6312,"children":6313},{"style":144},[6314],{"type":51,"value":1937},{"type":46,"tag":102,"props":6316,"children":6317},{"class":104,"line":259},[6318,6322,6326,6330,6334],{"type":46,"tag":102,"props":6319,"children":6320},{"style":144},[6321],{"type":51,"value":2173},{"type":46,"tag":102,"props":6323,"children":6324},{"style":198},[6325],{"type":51,"value":1684},{"type":46,"tag":102,"props":6327,"children":6328},{"style":144},[6329],{"type":51,"value":1765},{"type":46,"tag":102,"props":6331,"children":6332},{"style":144},[6333],{"type":51,"value":1810},{"type":46,"tag":102,"props":6335,"children":6336},{"style":144},[6337],{"type":51,"value":6338}," {},\n",{"type":46,"tag":102,"props":6340,"children":6341},{"class":104,"line":269},[6342,6346,6350,6354,6358,6363,6367,6371,6375,6379,6383,6387,6391,6395,6399,6403,6407,6411],{"type":46,"tag":102,"props":6343,"children":6344},{"style":144},[6345],{"type":51,"value":2173},{"type":46,"tag":102,"props":6347,"children":6348},{"style":198},[6349],{"type":51,"value":1663},{"type":46,"tag":102,"props":6351,"children":6352},{"style":144},[6353],{"type":51,"value":1765},{"type":46,"tag":102,"props":6355,"children":6356},{"style":144},[6357],{"type":51,"value":1810},{"type":46,"tag":102,"props":6359,"children":6360},{"style":144},[6361],{"type":51,"value":6362}," [{",{"type":46,"tag":102,"props":6364,"children":6365},{"style":144},[6366],{"type":51,"value":1765},{"type":46,"tag":102,"props":6368,"children":6369},{"style":3228},[6370],{"type":51,"value":1801},{"type":46,"tag":102,"props":6372,"children":6373},{"style":144},[6374],{"type":51,"value":1765},{"type":46,"tag":102,"props":6376,"children":6377},{"style":144},[6378],{"type":51,"value":1810},{"type":46,"tag":102,"props":6380,"children":6381},{"style":144},[6382],{"type":51,"value":167},{"type":46,"tag":102,"props":6384,"children":6385},{"style":133},[6386],{"type":51,"value":2437},{"type":46,"tag":102,"props":6388,"children":6389},{"style":144},[6390],{"type":51,"value":1765},{"type":46,"tag":102,"props":6392,"children":6393},{"style":144},[6394],{"type":51,"value":1828},{"type":46,"tag":102,"props":6396,"children":6397},{"style":144},[6398],{"type":51,"value":167},{"type":46,"tag":102,"props":6400,"children":6401},{"style":3228},[6402],{"type":51,"value":1837},{"type":46,"tag":102,"props":6404,"children":6405},{"style":144},[6406],{"type":51,"value":1765},{"type":46,"tag":102,"props":6408,"children":6409},{"style":144},[6410],{"type":51,"value":1810},{"type":46,"tag":102,"props":6412,"children":6413},{"style":144},[6414],{"type":51,"value":6415}," false}],\n",{"type":46,"tag":102,"props":6417,"children":6418},{"class":104,"line":278},[6419,6423,6427,6431,6435],{"type":46,"tag":102,"props":6420,"children":6421},{"style":144},[6422],{"type":51,"value":2173},{"type":46,"tag":102,"props":6424,"children":6425},{"style":198},[6426],{"type":51,"value":770},{"type":46,"tag":102,"props":6428,"children":6429},{"style":144},[6430],{"type":51,"value":1765},{"type":46,"tag":102,"props":6432,"children":6433},{"style":144},[6434],{"type":51,"value":1810},{"type":46,"tag":102,"props":6436,"children":6437},{"style":3228},[6438],{"type":51,"value":6439}," 500\n",{"type":46,"tag":102,"props":6441,"children":6442},{"class":104,"line":1416},[6443],{"type":46,"tag":102,"props":6444,"children":6445},{"style":144},[6446],{"type":51,"value":6447},"  },\n",{"type":46,"tag":102,"props":6449,"children":6450},{"class":104,"line":1425},[6451,6455,6460,6464,6468,6472,6476,6480],{"type":46,"tag":102,"props":6452,"children":6453},{"style":144},[6454],{"type":51,"value":1906},{"type":46,"tag":102,"props":6456,"children":6457},{"style":1798},[6458],{"type":51,"value":6459},"topic",{"type":46,"tag":102,"props":6461,"children":6462},{"style":144},[6463],{"type":51,"value":1765},{"type":46,"tag":102,"props":6465,"children":6466},{"style":144},[6467],{"type":51,"value":1810},{"type":46,"tag":102,"props":6469,"children":6470},{"style":144},[6471],{"type":51,"value":167},{"type":46,"tag":102,"props":6473,"children":6474},{"style":133},[6475],{"type":51,"value":1056},{"type":46,"tag":102,"props":6477,"children":6478},{"style":144},[6479],{"type":51,"value":1765},{"type":46,"tag":102,"props":6481,"children":6482},{"style":144},[6483],{"type":51,"value":1937},{"type":46,"tag":102,"props":6485,"children":6486},{"class":104,"line":1434},[6487,6491,6495,6499,6503],{"type":46,"tag":102,"props":6488,"children":6489},{"style":144},[6490],{"type":51,"value":1906},{"type":46,"tag":102,"props":6492,"children":6493},{"style":1798},[6494],{"type":51,"value":5414},{"type":46,"tag":102,"props":6496,"children":6497},{"style":144},[6498],{"type":51,"value":1765},{"type":46,"tag":102,"props":6500,"children":6501},{"style":144},[6502],{"type":51,"value":1810},{"type":46,"tag":102,"props":6504,"children":6505},{"style":144},[6506],{"type":51,"value":6507}," null\n",{"type":46,"tag":102,"props":6509,"children":6510},{"class":104,"line":1443},[6511],{"type":46,"tag":102,"props":6512,"children":6513},{"style":144},[6514],{"type":51,"value":2014},{"type":46,"tag":91,"props":6516,"children":6518},{"className":93,"code":6517,"language":95,"meta":96,"style":96},"# Generate and execute in one call\nomni ai generate-query your-model-id \"Top 10 customers by lifetime spend\"\n",[6519],{"type":46,"tag":75,"props":6520,"children":6521},{"__ignoreMap":96},[6522,6530],{"type":46,"tag":102,"props":6523,"children":6524},{"class":104,"line":105},[6525],{"type":46,"tag":102,"props":6526,"children":6527},{"style":109},[6528],{"type":51,"value":6529},"# Generate and execute in one call\n",{"type":46,"tag":102,"props":6531,"children":6532},{"class":104,"line":115},[6533,6537,6541,6545,6549,6553,6558],{"type":46,"tag":102,"props":6534,"children":6535},{"style":198},[6536],{"type":51,"value":15},{"type":46,"tag":102,"props":6538,"children":6539},{"style":133},[6540],{"type":51,"value":501},{"type":46,"tag":102,"props":6542,"children":6543},{"style":133},[6544],{"type":51,"value":6154},{"type":46,"tag":102,"props":6546,"children":6547},{"style":133},[6548],{"type":51,"value":6159},{"type":46,"tag":102,"props":6550,"children":6551},{"style":144},[6552],{"type":51,"value":167},{"type":46,"tag":102,"props":6554,"children":6555},{"style":133},[6556],{"type":51,"value":6557},"Top 10 customers by lifetime spend",{"type":46,"tag":102,"props":6559,"children":6560},{"style":144},[6561],{"type":51,"value":177},{"type":46,"tag":54,"props":6563,"children":6564},{},[6565],{"type":51,"value":6566},"Optional flags:",{"type":46,"tag":553,"props":6568,"children":6569},{},[6570,6581],{"type":46,"tag":557,"props":6571,"children":6572},{},[6573,6579],{"type":46,"tag":75,"props":6574,"children":6576},{"className":6575},[],[6577],{"type":51,"value":6578},"--branch-id",{"type":51,"value":6580}," — test against a specific model branch",{"type":46,"tag":557,"props":6582,"children":6583},{},[6584,6590],{"type":46,"tag":75,"props":6585,"children":6587},{"className":6586},[],[6588],{"type":51,"value":6589},"--current-topic-name",{"type":51,"value":6591}," — constrain topic selection to a specific topic",{"type":46,"tag":1323,"props":6593,"children":6595},{"id":6594},"pick-topic",[6596],{"type":51,"value":6597},"Pick Topic",{"type":46,"tag":54,"props":6599,"children":6600},{},[6601],{"type":51,"value":6602},"Check which topic the AI would select for a question, without generating a full query:",{"type":46,"tag":91,"props":6604,"children":6606},{"className":93,"code":6605,"language":95,"meta":96,"style":96},"omni ai pick-topic your-model-id \"How many users signed up last month?\"\n",[6607],{"type":46,"tag":75,"props":6608,"children":6609},{"__ignoreMap":96},[6610],{"type":46,"tag":102,"props":6611,"children":6612},{"class":104,"line":105},[6613,6617,6621,6626,6630,6634,6639],{"type":46,"tag":102,"props":6614,"children":6615},{"style":198},[6616],{"type":51,"value":15},{"type":46,"tag":102,"props":6618,"children":6619},{"style":133},[6620],{"type":51,"value":501},{"type":46,"tag":102,"props":6622,"children":6623},{"style":133},[6624],{"type":51,"value":6625}," pick-topic",{"type":46,"tag":102,"props":6627,"children":6628},{"style":133},[6629],{"type":51,"value":6159},{"type":46,"tag":102,"props":6631,"children":6632},{"style":144},[6633],{"type":51,"value":167},{"type":46,"tag":102,"props":6635,"children":6636},{"style":133},[6637],{"type":51,"value":6638},"How many users signed up last month?",{"type":46,"tag":102,"props":6640,"children":6641},{"style":144},[6642],{"type":51,"value":177},{"type":46,"tag":1323,"props":6644,"children":6646},{"id":6645},"agentic-queries-async",[6647],{"type":51,"value":6648},"Agentic Queries (async)",{"type":46,"tag":54,"props":6650,"children":6651},{},[6652],{"type":51,"value":6653},"For the full Blobby experience — multi-step analysis, tool use, and topic selection as the AI would actually behave in production. This is async: submit a job, poll for status, then retrieve the result.",{"type":46,"tag":91,"props":6655,"children":6657},{"className":93,"code":6656,"language":95,"meta":96,"style":96},"# 1. Submit a job\nomni ai job-submit your-model-id \"Analyze revenue trends and identify our fastest growing product category\"\n# → returns { \"jobId\": \"job-uuid\", \"conversationId\": \"conv-uuid\" }\n\n# 2. Poll the `state` field (NOT `status` — reading `.status` is empty every time)\nomni ai job-status \u003CjobId>\n\n# 3. Get the result\nomni ai job-result \u003CjobId>\n",[6658],{"type":46,"tag":75,"props":6659,"children":6660},{"__ignoreMap":96},[6661,6669,6702,6710,6717,6725,6758,6765,6773],{"type":46,"tag":102,"props":6662,"children":6663},{"class":104,"line":105},[6664],{"type":46,"tag":102,"props":6665,"children":6666},{"style":109},[6667],{"type":51,"value":6668},"# 1. Submit a job\n",{"type":46,"tag":102,"props":6670,"children":6671},{"class":104,"line":115},[6672,6676,6680,6685,6689,6693,6698],{"type":46,"tag":102,"props":6673,"children":6674},{"style":198},[6675],{"type":51,"value":15},{"type":46,"tag":102,"props":6677,"children":6678},{"style":133},[6679],{"type":51,"value":501},{"type":46,"tag":102,"props":6681,"children":6682},{"style":133},[6683],{"type":51,"value":6684}," job-submit",{"type":46,"tag":102,"props":6686,"children":6687},{"style":133},[6688],{"type":51,"value":6159},{"type":46,"tag":102,"props":6690,"children":6691},{"style":144},[6692],{"type":51,"value":167},{"type":46,"tag":102,"props":6694,"children":6695},{"style":133},[6696],{"type":51,"value":6697},"Analyze revenue trends and identify our fastest growing product category",{"type":46,"tag":102,"props":6699,"children":6700},{"style":144},[6701],{"type":51,"value":177},{"type":46,"tag":102,"props":6703,"children":6704},{"class":104,"line":33},[6705],{"type":46,"tag":102,"props":6706,"children":6707},{"style":109},[6708],{"type":51,"value":6709},"# → returns { \"jobId\": \"job-uuid\", \"conversationId\": \"conv-uuid\" }\n",{"type":46,"tag":102,"props":6711,"children":6712},{"class":104,"line":221},[6713],{"type":46,"tag":102,"props":6714,"children":6715},{"emptyLinePlaceholder":263},[6716],{"type":51,"value":266},{"type":46,"tag":102,"props":6718,"children":6719},{"class":104,"line":259},[6720],{"type":46,"tag":102,"props":6721,"children":6722},{"style":109},[6723],{"type":51,"value":6724},"# 2. Poll the `state` field (NOT `status` — reading `.status` is empty every time)\n",{"type":46,"tag":102,"props":6726,"children":6727},{"class":104,"line":269},[6728,6732,6736,6741,6745,6750,6754],{"type":46,"tag":102,"props":6729,"children":6730},{"style":198},[6731],{"type":51,"value":15},{"type":46,"tag":102,"props":6733,"children":6734},{"style":133},[6735],{"type":51,"value":501},{"type":46,"tag":102,"props":6737,"children":6738},{"style":133},[6739],{"type":51,"value":6740}," job-status",{"type":46,"tag":102,"props":6742,"children":6743},{"style":144},[6744],{"type":51,"value":240},{"type":46,"tag":102,"props":6746,"children":6747},{"style":133},[6748],{"type":51,"value":6749},"jobI",{"type":46,"tag":102,"props":6751,"children":6752},{"style":248},[6753],{"type":51,"value":5995},{"type":46,"tag":102,"props":6755,"children":6756},{"style":144},[6757],{"type":51,"value":256},{"type":46,"tag":102,"props":6759,"children":6760},{"class":104,"line":278},[6761],{"type":46,"tag":102,"props":6762,"children":6763},{"emptyLinePlaceholder":263},[6764],{"type":51,"value":266},{"type":46,"tag":102,"props":6766,"children":6767},{"class":104,"line":1416},[6768],{"type":46,"tag":102,"props":6769,"children":6770},{"style":109},[6771],{"type":51,"value":6772},"# 3. Get the result\n",{"type":46,"tag":102,"props":6774,"children":6775},{"class":104,"line":1425},[6776,6780,6784,6789,6793,6797,6801],{"type":46,"tag":102,"props":6777,"children":6778},{"style":198},[6779],{"type":51,"value":15},{"type":46,"tag":102,"props":6781,"children":6782},{"style":133},[6783],{"type":51,"value":501},{"type":46,"tag":102,"props":6785,"children":6786},{"style":133},[6787],{"type":51,"value":6788}," job-result",{"type":46,"tag":102,"props":6790,"children":6791},{"style":144},[6792],{"type":51,"value":240},{"type":46,"tag":102,"props":6794,"children":6795},{"style":133},[6796],{"type":51,"value":6749},{"type":46,"tag":102,"props":6798,"children":6799},{"style":248},[6800],{"type":51,"value":5995},{"type":46,"tag":102,"props":6802,"children":6803},{"style":144},[6804],{"type":51,"value":256},{"type":46,"tag":60,"props":6806,"children":6807},{},[6808],{"type":46,"tag":54,"props":6809,"children":6810},{},[6811,6816,6818,6827,6828,6834,6836,6849,6851,6857,6858,6864,6865,6871,6873,6881,6882,6888,6889,6895,6897,6902,6903,6907,6908,6914,6916,6922,6924,6930,6931,6936,6938,6943,6945,6951,6953,6959,6961,6967,6969,6977,6979,6988,6989,6995,6996,7002],{"type":46,"tag":67,"props":6812,"children":6813},{},[6814],{"type":51,"value":6815},"Job-status shape.",{"type":51,"value":6817}," Poll ",{"type":46,"tag":67,"props":6819,"children":6820},{},[6821],{"type":46,"tag":75,"props":6822,"children":6824},{"className":6823},[],[6825],{"type":51,"value":6826},"state",{"type":51,"value":2976},{"type":46,"tag":75,"props":6829,"children":6831},{"className":6830},[],[6832],{"type":51,"value":6833},"omni ai job-status",{"type":51,"value":6835}," has ",{"type":46,"tag":67,"props":6837,"children":6838},{},[6839,6841,6847],{"type":51,"value":6840},"no ",{"type":46,"tag":75,"props":6842,"children":6844},{"className":6843},[],[6845],{"type":51,"value":6846},"status",{"type":51,"value":6848}," field",{"type":51,"value":6850},". States: ",{"type":46,"tag":75,"props":6852,"children":6854},{"className":6853},[],[6855],{"type":51,"value":6856},"QUEUED",{"type":51,"value":3038},{"type":46,"tag":75,"props":6859,"children":6861},{"className":6860},[],[6862],{"type":51,"value":6863},"EXECUTING",{"type":51,"value":3038},{"type":46,"tag":75,"props":6866,"children":6868},{"className":6867},[],[6869],{"type":51,"value":6870},"DELIVERING",{"type":51,"value":6872}," → terminal ",{"type":46,"tag":67,"props":6874,"children":6875},{},[6876],{"type":46,"tag":75,"props":6877,"children":6879},{"className":6878},[],[6880],{"type":51,"value":861},{"type":51,"value":581},{"type":46,"tag":75,"props":6883,"children":6885},{"className":6884},[],[6886],{"type":51,"value":6887},"FAILED",{"type":51,"value":581},{"type":46,"tag":75,"props":6890,"children":6892},{"className":6891},[],[6893],{"type":51,"value":6894},"CANCELLED",{"type":51,"value":6896},". Note it's ",{"type":46,"tag":75,"props":6898,"children":6900},{"className":6899},[],[6901],{"type":51,"value":861},{"type":51,"value":616},{"type":46,"tag":67,"props":6904,"children":6905},{},[6906],{"type":51,"value":1077},{"type":51,"value":720},{"type":46,"tag":75,"props":6909,"children":6911},{"className":6910},[],[6912],{"type":51,"value":6913},"COMPLETED",{"type":51,"value":6915}," — the model-refresh (",{"type":46,"tag":75,"props":6917,"children":6919},{"className":6918},[],[6920],{"type":51,"value":6921},"completed",{"type":51,"value":6923},") and ",{"type":46,"tag":75,"props":6925,"children":6927},{"className":6926},[],[6928],{"type":51,"value":6929},"models jobs-get-status",{"type":51,"value":1233},{"type":46,"tag":75,"props":6932,"children":6934},{"className":6933},[],[6935],{"type":51,"value":6913},{"type":51,"value":6937},") flows spell it differently, so a poll loop reused across job types needs a ",{"type":46,"tag":67,"props":6939,"children":6940},{},[6941],{"type":51,"value":6942},"tolerant terminal check",{"type":51,"value":6944},": read the field as ",{"type":46,"tag":75,"props":6946,"children":6948},{"className":6947},[],[6949],{"type":51,"value":6950},"state ?? status",{"type":51,"value":6952},", lowercase it, treat ",{"type":46,"tag":75,"props":6954,"children":6956},{"className":6955},[],[6957],{"type":51,"value":6958},"startswith(\"complete\")",{"type":51,"value":6960}," as done and ",{"type":46,"tag":75,"props":6962,"children":6964},{"className":6963},[],[6965],{"type":51,"value":6966},"{failed, cancelled, error}",{"type":51,"value":6968}," as failed. The answer text is ",{"type":46,"tag":67,"props":6970,"children":6971},{},[6972],{"type":46,"tag":75,"props":6973,"children":6975},{"className":6974},[],[6976],{"type":51,"value":3765},{"type":51,"value":6978},"; structured output is under ",{"type":46,"tag":67,"props":6980,"children":6981},{},[6982],{"type":46,"tag":75,"props":6983,"children":6985},{"className":6984},[],[6986],{"type":51,"value":6987},"actions[]",{"type":51,"value":1233},{"type":46,"tag":75,"props":6990,"children":6992},{"className":6991},[],[6993],{"type":51,"value":6994},"type: \"generate_query\"",{"type":51,"value":3038},{"type":46,"tag":75,"props":6997,"children":6999},{"className":6998},[],[7000],{"type":51,"value":7001},"result.query",{"type":51,"value":7003},").",{"type":46,"tag":54,"props":7005,"children":7006},{},[7007,7009,7015,7017,7022,7024,7029],{"type":51,"value":7008},"The result contains an ",{"type":46,"tag":75,"props":7010,"children":7012},{"className":7011},[],[7013],{"type":51,"value":7014},"actions",{"type":51,"value":7016}," array with each step the AI took — look for actions with ",{"type":46,"tag":75,"props":7018,"children":7020},{"className":7019},[],[7021],{"type":51,"value":6994},{"type":51,"value":7023}," to extract the generated queries. The response also includes ",{"type":46,"tag":75,"props":7025,"children":7027},{"className":7026},[],[7028],{"type":51,"value":3765},{"type":51,"value":7030}," with the AI's narrative interpretation.",{"type":46,"tag":54,"props":7032,"children":7033},{},[7034,7036,7041,7043,7048,7050,7056,7058,7064,7066,7071],{"type":51,"value":7035},"Before presenting an async job answer, inspect the ",{"type":46,"tag":75,"props":7037,"children":7039},{"className":7038},[],[7040],{"type":51,"value":6987},{"type":51,"value":7042}," entries. A job can reach ",{"type":46,"tag":75,"props":7044,"children":7046},{"className":7045},[],[7047],{"type":51,"value":861},{"type":51,"value":7049}," while an individual ",{"type":46,"tag":75,"props":7051,"children":7053},{"className":7052},[],[7054],{"type":51,"value":7055},"generate_query",{"type":51,"value":7057}," action has ",{"type":46,"tag":75,"props":7059,"children":7061},{"className":7060},[],[7062],{"type":51,"value":7063},"status: \"pending\"",{"type":51,"value":7065}," or no ",{"type":46,"tag":75,"props":7067,"children":7069},{"className":7068},[],[7070],{"type":51,"value":3805},{"type":51,"value":7072},"; the narrative may then describe a query that was generated but not executed. If a required action is pending, do not treat the job summary as final. Run or regenerate that specific query, or continue the same analysis with another async job, then present only validated results.",{"type":46,"tag":54,"props":7074,"children":7075},{},[7076],{"type":51,"value":7077},"Additional job commands:",{"type":46,"tag":553,"props":7079,"children":7080},{},[7081,7092],{"type":46,"tag":557,"props":7082,"children":7083},{},[7084,7090],{"type":46,"tag":75,"props":7085,"children":7087},{"className":7086},[],[7088],{"type":51,"value":7089},"omni ai job-cancel \u003CjobId>",{"type":51,"value":7091}," — cancel a running job",{"type":46,"tag":557,"props":7093,"children":7094},{},[7095,7101],{"type":46,"tag":75,"props":7096,"children":7098},{"className":7097},[],[7099],{"type":51,"value":7100},"omni ai job-visualization \u003CjobId>",{"type":51,"value":7102}," — get the visualization output",{"type":46,"tag":1323,"props":7104,"children":7106},{"id":7105},"using-job-results-in-a-dashboard",[7107],{"type":51,"value":7108},"Using Job Results in a Dashboard",{"type":46,"tag":54,"props":7110,"children":7111},{},[7112,7114,7119,7121,7127],{"type":51,"value":7113},"The query object inside a job result is ",{"type":46,"tag":67,"props":7115,"children":7116},{},[7117],{"type":51,"value":7118},"not directly usable",{"type":51,"value":7120}," as a dashboard ",{"type":46,"tag":75,"props":7122,"children":7124},{"className":7123},[],[7125],{"type":51,"value":7126},"queryPresentation",{"type":51,"value":7128}," — it requires a transformation. Key rules:",{"type":46,"tag":553,"props":7130,"children":7131},{},[7132,7168,7192],{"type":46,"tag":557,"props":7133,"children":7134},{},[7135,7145,7147,7151,7153,7158,7160,7166],{"type":46,"tag":67,"props":7136,"children":7137},{},[7138,7140],{"type":51,"value":7139},"Always strip ",{"type":46,"tag":75,"props":7141,"children":7143},{"className":7142},[],[7144],{"type":51,"value":595},{"type":51,"value":7146}," — it makes the tile a non-topic query, so it bypasses ",{"type":46,"tag":67,"props":7148,"children":7149},{},[7150],{"type":51,"value":4864},{"type":51,"value":7152}," model controls (object-level access grants, row-level access filters, and ",{"type":46,"tag":75,"props":7154,"children":7156},{"className":7155},[],[7157],{"type":51,"value":1274},{"type":51,"value":7159},") and is invisible to restricted roles in a dashboard. The ",{"type":46,"tag":75,"props":7161,"children":7163},{"className":7162},[],[7164],{"type":51,"value":7165},"${Order Items}",{"type":51,"value":7167}," topic-name token it contains also fails outside the job execution context.",{"type":46,"tag":557,"props":7169,"children":7170},{},[7171,7183,7185,7190],{"type":46,"tag":67,"props":7172,"children":7173},{},[7174,7176,7181],{"type":51,"value":7175},"When ",{"type":46,"tag":75,"props":7177,"children":7179},{"className":7178},[],[7180],{"type":51,"value":678},{"type":51,"value":7182}," is non-empty",{"type":51,"value":7184},", stripping ",{"type":46,"tag":75,"props":7186,"children":7188},{"className":7187},[],[7189],{"type":51,"value":595},{"type":51,"value":7191}," is sufficient — the structured calc renders correctly.",{"type":46,"tag":557,"props":7193,"children":7194},{},[7195,7206,7208,7214,7216,7222,7224,7230,7232,7237,7239,7244,7245,7251],{"type":46,"tag":67,"props":7196,"children":7197},{},[7198,7199,7204],{"type":51,"value":7175},{"type":46,"tag":75,"props":7200,"children":7202},{"className":7201},[],[7203],{"type":51,"value":678},{"type":51,"value":7205}," is empty",{"type":51,"value":7207},", Blobby authored the calc as inline SQL. The parsed AST is available in ",{"type":46,"tag":75,"props":7209,"children":7211},{"className":7210},[],[7212],{"type":51,"value":7213},"csvResultFields",{"type":51,"value":7215}," (at ",{"type":46,"tag":75,"props":7217,"children":7219},{"className":7218},[],[7220],{"type":51,"value":7221},"result",{"type":51,"value":7223}," level, not inside ",{"type":46,"tag":75,"props":7225,"children":7227},{"className":7226},[],[7228],{"type":51,"value":7229},"result[\"query\"]",{"type":51,"value":7231},") and can be reconstructed as a proper ",{"type":46,"tag":75,"props":7233,"children":7235},{"className":7234},[],[7236],{"type":51,"value":678},{"type":51,"value":7238}," entry. Fields whose top-level expr operator is an aggregate (",{"type":46,"tag":75,"props":7240,"children":7242},{"className":7241},[],[7243],{"type":51,"value":4203},{"type":51,"value":616},{"type":46,"tag":75,"props":7246,"children":7248},{"className":7247},[],[7249],{"type":51,"value":7250},"COUNT",{"type":51,"value":7252},", etc.) cannot be reconstructed as table calcs — add them to the model as filtered measures instead.",{"type":46,"tag":54,"props":7254,"children":7255},{},[7256,7258,7263],{"type":51,"value":7257},"For the complete transformation algorithm, discriminator logic, field-ref injection, aggregate-skip handling, and sanity-check approach, see ",{"type":46,"tag":2092,"props":7259,"children":7261},{"href":7260},"references\u002Fjob-result-to-presentation.md",[7262],{"type":51,"value":7260},{"type":51,"value":386},{"type":46,"tag":1323,"props":7265,"children":7267},{"id":7266},"when-to-use-which-approach",[7268],{"type":51,"value":7269},"When to Use Which Approach",{"type":46,"tag":996,"props":7271,"children":7272},{},[7273,7289],{"type":46,"tag":1474,"props":7274,"children":7275},{},[7276],{"type":46,"tag":1478,"props":7277,"children":7278},{},[7279,7284],{"type":46,"tag":1482,"props":7280,"children":7281},{},[7282],{"type":51,"value":7283},"Approach",{"type":46,"tag":1482,"props":7285,"children":7286},{},[7287],{"type":51,"value":7288},"Best For",{"type":46,"tag":1498,"props":7290,"children":7291},{},[7292,7308,7330,7360,7377],{"type":46,"tag":1478,"props":7293,"children":7294},{},[7295,7303],{"type":46,"tag":1505,"props":7296,"children":7297},{},[7298],{"type":46,"tag":75,"props":7299,"children":7301},{"className":7300},[],[7302],{"type":51,"value":3702},{"type":46,"tag":1505,"props":7304,"children":7305},{},[7306],{"type":51,"value":7307},"You know exactly which fields, filters, and sorts you need",{"type":46,"tag":1478,"props":7309,"children":7310},{},[7311,7325],{"type":46,"tag":1505,"props":7312,"children":7313},{},[7314,7319,7320],{"type":46,"tag":75,"props":7315,"children":7317},{"className":7316},[],[7318],{"type":51,"value":3702},{"type":51,"value":3787},{"type":46,"tag":75,"props":7321,"children":7323},{"className":7322},[],[7324],{"type":51,"value":678},{"type":46,"tag":1505,"props":7326,"children":7327},{},[7328],{"type":51,"value":7329},"Explicit table-calculation requests where you know or can copy the AST shape",{"type":46,"tag":1478,"props":7331,"children":7332},{},[7333,7341],{"type":46,"tag":1505,"props":7334,"children":7335},{},[7336],{"type":46,"tag":75,"props":7337,"children":7339},{"className":7338},[],[7340],{"type":51,"value":587},{"type":46,"tag":1505,"props":7342,"children":7343},{},[7344,7346,7351,7353,7358],{"type":51,"value":7345},"Drafting a ",{"type":46,"tag":67,"props":7347,"children":7348},{},[7349],{"type":51,"value":7350},"simple",{"type":51,"value":7352}," query AST to inspect\u002Fhand-edit; ",{"type":46,"tag":67,"props":7354,"children":7355},{},[7356],{"type":51,"value":7357},"or shape-only when query execution isn't permitted",{"type":51,"value":7359}," (the fallback when you can't run an agentic job)",{"type":46,"tag":1478,"props":7361,"children":7362},{},[7363,7372],{"type":46,"tag":1505,"props":7364,"children":7365},{},[7366],{"type":46,"tag":75,"props":7367,"children":7369},{"className":7368},[],[7370],{"type":51,"value":7371},"omni ai generate-query --run-query=true",{"type":46,"tag":1505,"props":7373,"children":7374},{},[7375],{"type":51,"value":7376},"Simple dimension\u002Fmeasure queries where you want a synchronous response",{"type":46,"tag":1478,"props":7378,"children":7379},{},[7380,7388],{"type":46,"tag":1505,"props":7381,"children":7382},{},[7383],{"type":46,"tag":75,"props":7384,"children":7386},{"className":7385},[],[7387],{"type":51,"value":3722},{"type":46,"tag":1505,"props":7389,"children":7390},{},[7391,7396,7398,7403,7405,7410,7411,7416,7417],{"type":46,"tag":67,"props":7392,"children":7393},{},[7394],{"type":51,"value":7395},"Anything non-trivial",{"type":51,"value":7397}," — multi-step analysis, ",{"type":46,"tag":67,"props":7399,"children":7400},{},[7401],{"type":51,"value":7402},"or generating a table calc \u002F reusable query AST",{"type":51,"value":7404},". Lift the structured query\u002F",{"type":46,"tag":75,"props":7406,"children":7408},{"className":7407},[],[7409],{"type":51,"value":3204},{"type":51,"value":3941},{"type":46,"tag":75,"props":7412,"children":7414},{"className":7413},[],[7415],{"type":51,"value":3757},{"type":51,"value":3948},{"type":46,"tag":75,"props":7418,"children":7420},{"className":7419},[],[7421],{"type":51,"value":3954},{"type":46,"tag":54,"props":7423,"children":7424},{},[7425,7430,7432,7437,7439,7444,7446,7451,7453,7458,7460,7465,7466,7471,7473,7477],{"type":46,"tag":67,"props":7426,"children":7427},{},[7428],{"type":51,"value":7429},"Steer the prompt when you know the shape:",{"type":51,"value":7431}," when a table calculation is the desired or known-correct output, say so in the prompt — append \"… ",{"type":46,"tag":353,"props":7433,"children":7434},{},[7435],{"type":51,"value":7436},"as a table calculation",{"type":51,"value":7438},"\", or name the semantics (\"running total\" \u002F \"% of total\" \u002F \"moving average\") — so the agentic job emits a real calc in ",{"type":46,"tag":75,"props":7440,"children":7442},{"className":7441},[],[7443],{"type":51,"value":3757},{"type":51,"value":7445}," rather than a ",{"type":46,"tag":75,"props":7447,"children":7449},{"className":7448},[],[7450],{"type":51,"value":595},{"type":51,"value":7452},"\u002FSQL fallback. (The agentic-vs-",{"type":46,"tag":75,"props":7454,"children":7456},{"className":7455},[],[7457],{"type":51,"value":3732},{"type":51,"value":7459}," split and the \"lift the AST from ",{"type":46,"tag":75,"props":7461,"children":7463},{"className":7462},[],[7464],{"type":51,"value":3757},{"type":51,"value":3948},{"type":46,"tag":75,"props":7467,"children":7469},{"className":7468},[],[7470],{"type":51,"value":3954},{"type":51,"value":7472},"\" rule are in the table above and under ",{"type":46,"tag":353,"props":7474,"children":7475},{},[7476],{"type":51,"value":3050},{"type":51,"value":3848},{"type":46,"tag":84,"props":7479,"children":7481},{"id":7480},"multi-step-analysis-pattern",[7482],{"type":51,"value":7483},"Multi-Step Analysis Pattern",{"type":46,"tag":54,"props":7485,"children":7486},{},[7487],{"type":51,"value":7488},"For complex analysis, chain queries:",{"type":46,"tag":1150,"props":7490,"children":7491},{},[7492,7502,7512,7522],{"type":46,"tag":557,"props":7493,"children":7494},{},[7495,7500],{"type":46,"tag":67,"props":7496,"children":7497},{},[7498],{"type":51,"value":7499},"Broad query",{"type":51,"value":7501}," — understand the shape of the data",{"type":46,"tag":557,"props":7503,"children":7504},{},[7505,7510],{"type":46,"tag":67,"props":7506,"children":7507},{},[7508],{"type":51,"value":7509},"Inspect results",{"type":51,"value":7511}," — identify interesting segments or patterns",{"type":46,"tag":557,"props":7513,"children":7514},{},[7515,7520],{"type":46,"tag":67,"props":7516,"children":7517},{},[7518],{"type":51,"value":7519},"Focused follow-ups",{"type":51,"value":7521}," — filter based on findings",{"type":46,"tag":557,"props":7523,"children":7524},{},[7525,7530],{"type":46,"tag":67,"props":7526,"children":7527},{},[7528],{"type":51,"value":7529},"Synthesize",{"type":51,"value":7531}," — combine results into a narrative",{"type":46,"tag":84,"props":7533,"children":7535},{"id":7534},"common-query-patterns",[7536],{"type":51,"value":7537},"Common Query Patterns",{"type":46,"tag":54,"props":7539,"children":7540},{},[7541,7546],{"type":46,"tag":67,"props":7542,"children":7543},{},[7544],{"type":51,"value":7545},"Time Series",{"type":51,"value":7547},": fields + date dimension + ascending sort + date filter",{"type":46,"tag":54,"props":7549,"children":7550},{},[7551,7556],{"type":46,"tag":67,"props":7552,"children":7553},{},[7554],{"type":51,"value":7555},"Top N",{"type":51,"value":7557},": fields + metric + descending sort + limit",{"type":46,"tag":54,"props":7559,"children":7560},{},[7561,7566],{"type":46,"tag":67,"props":7562,"children":7563},{},[7564],{"type":51,"value":7565},"Aggregation with Breakdown",{"type":51,"value":7567},": multiple dimensions + multiple measures + descending sort by key metric",{"type":46,"tag":84,"props":7569,"children":7571},{"id":7570},"known-bugs",[7572],{"type":51,"value":7573},"Known Bugs",{"type":46,"tag":553,"props":7575,"children":7576},{},[7577,7599,7616],{"type":46,"tag":557,"props":7578,"children":7579},{},[7580,7597],{"type":46,"tag":67,"props":7581,"children":7582},{},[7583,7589,7591],{"type":46,"tag":75,"props":7584,"children":7586},{"className":7585},[],[7587],{"type":51,"value":7588},"IS_NOT_NULL",{"type":51,"value":7590}," filter generates ",{"type":46,"tag":75,"props":7592,"children":7594},{"className":7593},[],[7595],{"type":51,"value":7596},"IS NULL",{"type":51,"value":7598}," (reported Omni bug) — workaround: invert the filter logic or use the base view to apply the filter differently.",{"type":46,"tag":557,"props":7600,"children":7601},{},[7602,7607,7609,7614],{"type":46,"tag":67,"props":7603,"children":7604},{},[7605],{"type":51,"value":7606},"Boolean filters may be silently dropped",{"type":51,"value":7608}," when a ",{"type":46,"tag":75,"props":7610,"children":7612},{"className":7611},[],[7613],{"type":51,"value":1705},{"type":51,"value":7615}," array is present — if boolean filters aren't applying, remove the pivot and test again.",{"type":46,"tag":557,"props":7617,"children":7618},{},[7619,7632],{"type":46,"tag":67,"props":7620,"children":7621},{},[7622,7624,7630],{"type":51,"value":7623},"Some natural-language date filter strings can hit ",{"type":46,"tag":75,"props":7625,"children":7627},{"className":7626},[],[7628],{"type":51,"value":7629},"query_id",{"type":51,"value":7631}," parser errors",{"type":51,"value":7633}," — retry with the typed date filter object shape shown above before abandoning the filter.",{"type":46,"tag":84,"props":7635,"children":7637},{"id":7636},"linking-to-results",[7638],{"type":51,"value":7639},"Linking to Results",{"type":46,"tag":54,"props":7641,"children":7642},{},[7643],{"type":51,"value":7644},"Queries are ephemeral — there is no persistent URL for a query result. To give the user a shareable link:",{"type":46,"tag":553,"props":7646,"children":7647},{},[7648,7673],{"type":46,"tag":557,"props":7649,"children":7650},{},[7651,7656,7657,7663,7665,7671],{"type":46,"tag":67,"props":7652,"children":7653},{},[7654],{"type":51,"value":7655},"For existing dashboards",{"type":51,"value":1778},{"type":46,"tag":75,"props":7658,"children":7660},{"className":7659},[],[7661],{"type":51,"value":7662},"{OMNI_BASE_URL}\u002Fdashboards\u002F{identifier}",{"type":51,"value":7664}," (the ",{"type":46,"tag":75,"props":7666,"children":7668},{"className":7667},[],[7669],{"type":51,"value":7670},"identifier",{"type":51,"value":7672}," comes from the document API response)",{"type":46,"tag":557,"props":7674,"children":7675},{},[7676,7681,7683,7688,7690,7695,7697],{"type":46,"tag":67,"props":7677,"children":7678},{},[7679],{"type":51,"value":7680},"For new analysis",{"type":51,"value":7682},": Create a document via ",{"type":46,"tag":75,"props":7684,"children":7686},{"className":7685},[],[7687],{"type":51,"value":1130},{"type":51,"value":7689}," with the query as a ",{"type":46,"tag":75,"props":7691,"children":7693},{"className":7692},[],[7694],{"type":51,"value":7126},{"type":51,"value":7696},", then share ",{"type":46,"tag":75,"props":7698,"children":7700},{"className":7699},[],[7701],{"type":51,"value":7662},{"type":46,"tag":84,"props":7703,"children":7705},{"id":7704},"docs-reference",[7706],{"type":51,"value":7707},"Docs Reference",{"type":46,"tag":553,"props":7709,"children":7710},{},[7711],{"type":46,"tag":557,"props":7712,"children":7713},{},[7714,7722,7724,7731,7732,7739,7740],{"type":46,"tag":2092,"props":7715,"children":7719},{"href":7716,"rel":7717},"https:\u002F\u002Fdocs.omni.co\u002Fapi\u002Fqueries.md",[7718],"nofollow",[7720],{"type":51,"value":7721},"Query API",{"type":51,"value":7723}," · ",{"type":46,"tag":2092,"props":7725,"children":7728},{"href":7726,"rel":7727},"https:\u002F\u002Fdocs.omni.co\u002Fguides\u002Frun-document-queries.md",[7718],[7729],{"type":51,"value":7730},"Running Document Queries",{"type":51,"value":7723},{"type":46,"tag":2092,"props":7733,"children":7736},{"href":7734,"rel":7735},"https:\u002F\u002Fdocs.omni.co\u002Fanalyze-explore\u002Fquerying.md",[7718],[7737],{"type":51,"value":7738},"Querying Documentation",{"type":51,"value":7723},{"type":46,"tag":2092,"props":7741,"children":7744},{"href":7742,"rel":7743},"https:\u002F\u002Fdocs.omni.co\u002Fmodeling\u002Ffilters.md",[7718],[7745],{"type":51,"value":7746},"Filter Syntax",{"type":46,"tag":84,"props":7748,"children":7750},{"id":7749},"related-skills",[7751],{"type":51,"value":7752},"Related Skills",{"type":46,"tag":553,"props":7754,"children":7755},{},[7756,7765,7775,7784],{"type":46,"tag":557,"props":7757,"children":7758},{},[7759,7763],{"type":46,"tag":67,"props":7760,"children":7761},{},[7762],{"type":51,"value":80},{"type":51,"value":7764}," — discover fields and topics before querying",{"type":46,"tag":557,"props":7766,"children":7767},{},[7768,7773],{"type":46,"tag":67,"props":7769,"children":7770},{},[7771],{"type":51,"value":7772},"omni-content-explorer",{"type":51,"value":7774}," — find dashboards whose queries you can extract",{"type":46,"tag":557,"props":7776,"children":7777},{},[7778,7782],{"type":46,"tag":67,"props":7779,"children":7780},{},[7781],{"type":51,"value":1130},{"type":51,"value":7783}," — turn query results into dashboards",{"type":46,"tag":557,"props":7785,"children":7786},{},[7787,7792],{"type":46,"tag":67,"props":7788,"children":7789},{},[7790],{"type":51,"value":7791},"omni-ai-eval",{"type":51,"value":7793}," — benchmark and test AI query generation accuracy",{"type":46,"tag":7795,"props":7796,"children":7797},"style",{},[7798],{"type":51,"value":7799},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":7801,"total":1443},[7802,7812,7823,7838,7853,7866,7882,7895,7908,7916,7931],{"slug":7803,"name":7803,"fn":7804,"description":7805,"org":7806,"tags":7807,"stars":29,"repoUrl":30,"updatedAt":7811},"omni-admin","administer Omni Analytics","Administer an Omni Analytics instance — manage connections, users, groups, user attributes, permissions, schedules, and schema refreshes via the Omni CLI. Use this skill whenever someone wants to manage users or groups, set up permissions on a dashboard or folder, configure user attributes, create or modify schedules, manage database connections, refresh a schema, set up access controls, provision users, or any variant of \"add a user\", \"give access to\", \"set up permissions\", \"who has access\", \"configure connection\", \"refresh the schema\", or \"schedule a delivery\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7808,7809,7810],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},"2026-04-06T18:10:58.235995",{"slug":7791,"name":7791,"fn":7813,"description":7814,"org":7815,"tags":7816,"stars":29,"repoUrl":30,"updatedAt":7822},"evaluate Omni AI query accuracy","Evaluate Omni AI accuracy using Omni's built-in eval system — define a prompt set, run a judged eval against a model (or branch), and read the accuracy-judge verdicts. Use this skill whenever someone wants to evaluate Omni AI, benchmark Blobby, run regression tests, compare AI output across branches or model-context changes, measure AI quality, run A\u002FB tests on model changes, assess the impact of an ai_context or modeling change, or any variant of \"run evals\", \"test Blobby\", \"benchmark query generation\", \"compare AI results\", \"regression test\", \"how accurate is the AI\", or \"measure the impact of my changes\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7817,7818,7821],{"name":24,"slug":25,"type":16},{"name":7819,"slug":7820,"type":16},"Evals","evals",{"name":14,"slug":15,"type":16},"2026-04-06T18:10:59.485921",{"slug":7824,"name":7824,"fn":7825,"description":7826,"org":7827,"tags":7828,"stars":29,"repoUrl":30,"updatedAt":7837},"omni-ai-optimizer","optimize Omni models for AI","Optimize your Omni Analytics model for Blobby, the Omni Agent — configure ai_context, ai_fields, synonyms, sample_queries, and AI-specific topic extensions. Use this skill whenever someone wants to improve AI accuracy in Omni, make Blobby smarter, add AI context or example questions, curate which fields the AI sees, personalize AI context by user attribute, scope context to a model tier or agent, diagnose context-window pruning or truncation, control which topics AI can reach, troubleshoot why Blobby gives wrong answers, or any variant of \"make the AI better\", \"Blobby isn't answering correctly\", \"optimize for AI\", or \"teach the AI about our data\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7829,7832,7833,7836],{"name":7830,"slug":7831,"type":16},"AI Context","ai-context",{"name":24,"slug":25,"type":16},{"name":7834,"slug":7835,"type":16},"Data Modeling","data-modeling",{"name":14,"slug":15,"type":16},"2026-07-27T06:09:42.358967",{"slug":1130,"name":1130,"fn":7839,"description":7840,"org":7841,"tags":7842,"stars":29,"repoUrl":30,"updatedAt":7852},"manage Omni Analytics documents and dashboards","Create, update, and manage Omni Analytics documents and dashboards programmatically — document lifecycle, drafts, tiles, visualizations, filters, controls, and layouts — using the Omni CLI. Use this skill whenever someone wants to build a dashboard, create a workbook, add tiles or charts, configure dashboard filters or controls, update an existing dashboard's model, set up a KPI view, create visualizations, lay out a dashboard, arrange tiles or pages, create a document, edit a dashboard as a draft, publish a draft, change dashboard settings, rename a workbook, delete a dashboard, move a document to a folder, duplicate a dashboard, or any variant of \"build a dashboard for\", \"create a report showing\", \"add a chart to\", \"make a dashboard\", \"update the dashboard layout\", \"rename this document\", \"publish this draft\", \"move to folder\", or \"delete this dashboard\". Also use when modifying dashboard-level model customizations like workbook-specific joins or fields.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7843,7844,7845,7848,7851],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":7846,"slug":7847,"type":16},"Dashboards","dashboards",{"name":7849,"slug":7850,"type":16},"Data Visualization","data-visualization",{"name":14,"slug":15,"type":16},"2026-04-06T18:11:02.007785",{"slug":7772,"name":7772,"fn":7854,"description":7855,"org":7856,"tags":7857,"stars":29,"repoUrl":30,"updatedAt":7865},"find and organize Omni Analytics content","Find, browse, and organize content in Omni Analytics — dashboards, workbooks, folders, and labels — using the Omni CLI. Use this skill whenever someone wants to find an existing dashboard, search for content, list workbooks, browse folders, see what dashboards exist, find popular reports, download a dashboard as PDF or PNG, favorite content, manage labels on documents, or any variant of \"find the dashboard about\", \"what reports do we have\", \"show me our dashboards\", \"where is the sales report\", or \"download this dashboard\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7858,7859,7860,7861,7862],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":7846,"slug":7847,"type":16},{"name":14,"slug":15,"type":16},{"name":7863,"slug":7864,"type":16},"Search","search","2026-04-06T18:11:04.516766",{"slug":7867,"name":7867,"fn":7868,"description":7869,"org":7870,"tags":7871,"stars":29,"repoUrl":30,"updatedAt":7881},"omni-embed","embed Omni Analytics dashboards","Embed Omni Analytics dashboards in external applications — URL signing, custom themes, iframe events, entity workspaces, and permission-aware content — using the @omni-co\u002Fembed SDK and Omni CLI. Use this skill whenever someone wants to embed a dashboard, sign an embed URL, customize the embedded theme, handle embed events, listen for clicks or drills in the iframe, send filters to an embedded dashboard, set up entity workspaces, look up embed users, build a permission-aware content list, white-label an embedded dashboard, or any variant of \"embed this dashboard\", \"customize the iframe theme\", \"handle click events from the embed\", \"filter the embedded dashboard\", \"set up embedding\", or \"what dashboards can this user see\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7872,7873,7874,7877,7878],{"name":24,"slug":25,"type":16},{"name":7846,"slug":7847,"type":16},{"name":7875,"slug":7876,"type":16},"Frontend","frontend",{"name":14,"slug":15,"type":16},{"name":7879,"slug":7880,"type":16},"SDK","sdk","2026-04-06T18:10:55.739544",{"slug":1138,"name":1138,"fn":7883,"description":7884,"org":7885,"tags":7886,"stars":29,"repoUrl":30,"updatedAt":7894},"build Omni Analytics semantic models","Create and edit Omni Analytics semantic model definitions — views, topics, dimensions, measures, relationships, and query views — using YAML through the Omni CLI. Use this skill whenever someone wants to add a field, create a new dimension or measure, define a topic, set up joins between tables, modify the data model, build a new view, add a calculated field, create a relationship, edit YAML, work on a branch, promote model changes, or any variant of \"model this data\", \"add this metric\", \"create a view for\", or \"set up a join between\". Also use for migrating modeling patterns since Omni's YAML is conceptually similar to other semantic layer definitions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7887,7888,7889,7890,7891],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":7834,"slug":7835,"type":16},{"name":14,"slug":15,"type":16},{"name":7892,"slug":7893,"type":16},"YAML","yaml","2026-04-06T18:11:05.775943",{"slug":80,"name":80,"fn":7896,"description":7897,"org":7898,"tags":7899,"stars":29,"repoUrl":30,"updatedAt":7907},"discover and inspect Omni Analytics models","Discover and inspect Omni Analytics models, topics, views, fields, dimensions, measures, and relationships using the Omni CLI. Use this skill whenever someone wants to understand what data is available in Omni, explore their semantic model, find specific fields or views, check how tables join together, see what topics exist, or asks any variant of \"what can I query\", \"what fields are available\", \"show me the model\", \"what data do we have\", or \"how is this data modeled\". Also use when you need to understand the Omni model structure before building or modifying anything.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7900,7901,7902,7903,7906],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"name":7904,"slug":7905,"type":16},"Knowledge Management","knowledge-management",{"name":14,"slug":15,"type":16},"2026-04-06T18:11:00.739003",{"slug":4,"name":4,"fn":5,"description":6,"org":7909,"tags":7910,"stars":29,"repoUrl":30,"updatedAt":31},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7911,7912,7913,7914,7915],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":27,"slug":28,"type":16},{"slug":7917,"name":7917,"fn":7918,"description":7919,"org":7920,"tags":7921,"stars":29,"repoUrl":30,"updatedAt":7930},"omni-to-databricks-metric-view","convert Omni topics to Databricks Metric Views","Convert an Omni Analytics topic into a Databricks Metric View definition in Unity Catalog. Use this skill whenever someone wants to export Omni metrics to Databricks, create a Metric View from an Omni topic, harden BI metrics into Unity Catalog, or bridge Omni's semantic layer with Databricks AI\u002FBI dashboards and Genie spaces.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7922,7923,7926,7929],{"name":24,"slug":25,"type":16},{"name":7924,"slug":7925,"type":16},"Data Engineering","data-engineering",{"name":7927,"slug":7928,"type":16},"Databricks","databricks",{"name":14,"slug":15,"type":16},"2026-04-09T04:47:50.695014",{"slug":7932,"name":7932,"fn":7933,"description":7934,"org":7935,"tags":7936,"stars":29,"repoUrl":30,"updatedAt":7944},"omni-to-snowflake-semantic-view","convert Omni topics to Snowflake views","Convert an Omni Analytics topic into a Snowflake Semantic View YAML definition. Use this skill whenever someone wants to export Omni metrics to Snowflake, create a Semantic View from an Omni topic, harden BI metrics into the warehouse, or bridge Omni's semantic layer with Snowflake Cortex Analyst.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7937,7938,7939,7940,7943],{"name":24,"slug":25,"type":16},{"name":7924,"slug":7925,"type":16},{"name":14,"slug":15,"type":16},{"name":7941,"slug":7942,"type":16},"Snowflake","snowflake",{"name":7892,"slug":7893,"type":16},"2026-04-06T18:11:25.009706",{"items":7946,"total":1443},[7947,7953,7959,7966,7974,7982,7990],{"slug":7803,"name":7803,"fn":7804,"description":7805,"org":7948,"tags":7949,"stars":29,"repoUrl":30,"updatedAt":7811},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7950,7951,7952],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"slug":7791,"name":7791,"fn":7813,"description":7814,"org":7954,"tags":7955,"stars":29,"repoUrl":30,"updatedAt":7822},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7956,7957,7958],{"name":24,"slug":25,"type":16},{"name":7819,"slug":7820,"type":16},{"name":14,"slug":15,"type":16},{"slug":7824,"name":7824,"fn":7825,"description":7826,"org":7960,"tags":7961,"stars":29,"repoUrl":30,"updatedAt":7837},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7962,7963,7964,7965],{"name":7830,"slug":7831,"type":16},{"name":24,"slug":25,"type":16},{"name":7834,"slug":7835,"type":16},{"name":14,"slug":15,"type":16},{"slug":1130,"name":1130,"fn":7839,"description":7840,"org":7967,"tags":7968,"stars":29,"repoUrl":30,"updatedAt":7852},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7969,7970,7971,7972,7973],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":7846,"slug":7847,"type":16},{"name":7849,"slug":7850,"type":16},{"name":14,"slug":15,"type":16},{"slug":7772,"name":7772,"fn":7854,"description":7855,"org":7975,"tags":7976,"stars":29,"repoUrl":30,"updatedAt":7865},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7977,7978,7979,7980,7981],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":7846,"slug":7847,"type":16},{"name":14,"slug":15,"type":16},{"name":7863,"slug":7864,"type":16},{"slug":7867,"name":7867,"fn":7868,"description":7869,"org":7983,"tags":7984,"stars":29,"repoUrl":30,"updatedAt":7881},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7985,7986,7987,7988,7989],{"name":24,"slug":25,"type":16},{"name":7846,"slug":7847,"type":16},{"name":7875,"slug":7876,"type":16},{"name":14,"slug":15,"type":16},{"name":7879,"slug":7880,"type":16},{"slug":1138,"name":1138,"fn":7883,"description":7884,"org":7991,"tags":7992,"stars":29,"repoUrl":30,"updatedAt":7894},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7993,7994,7995,7996,7997],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":7834,"slug":7835,"type":16},{"name":14,"slug":15,"type":16},{"name":7892,"slug":7893,"type":16}]