omni-query

Run and validate queries against Omni Analytics' semantic layer via the Omni CLI.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/noiz354/oc-rebirth-rca --skill omni-query-noiz354
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: omni-query
Source: https://github.com/noiz354/oc-rebirth-rca/tree/main/planning-zip/omni-agent-skills/skills/omni-query
Command: npx skills add https://github.com/noiz354/oc-rebirth-rca --skill omni-query-noiz354

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Getting accurate numbers out of Omni Analytics requires correctly structured query JSON — topics, join paths, filters, pivots, and table-calculation ASTs — and small mistakes silently produce wrong or empty results. This Skill guides an AI agent through building, running, and validating Omni queries so the returned data is trustworthy. ## Core Features & Use Cases - Semantic Query Execution: Build and run queries on Omni topics with dimensions, measures, filters, sorts, and pivots through the Omni CLI, with result validation (error checks, row counts, filter-binding verification). - Table Calculations: Author post-query computed columns — running totals, percent of total, month-over-month change, moving averages, tier labels, SUMIF, VLOOKUP, DATEDIF — using the correct calculations[] AST shape. - AI-Powered & Raw SQL Paths: Generate queries from natural language, run multi-step agentic analysis jobs, or execute raw SQL via userEditedSQL when the semantic layer cannot express the logic. - Use Case: A user asks "show monthly revenue with a running total for the last 12 months" — the Skill builds the query with an OMNI_RUNNING_TOTAL calc, ensures the calc name appears in query.fields, runs it, and validates the output before presenting it. ## Quick Start Ask the agent to query Omni for total revenue by month over the last 90 days and verify the results before showing them.

Frequently Asked Questions about omni-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a query against Omni Analytics from the command line?▼

Use `omni query run` with a JSON body containing the modelId, base view as `table`, a `fields` array of view.field references, and `join_paths_from_topic_name` set to the topic. Add `resultType: "csv"` or `"json"` at the top level to get readable output instead of the default base64 Arrow response.

How do I add a running total or percent-of-total column to an Omni query?▼

Add a `calculations[]` entry with a `calc_name` and a `sql_expression` AST using a template operator like `Omni.OMNI_RUNNING_TOTAL` or `Omni.OMNI_PERCENT_OF_TOTAL` with one `for_calc: true` field operand. The `calc_name` must also appear in `query.fields` or the column is computed but never rendered.

Why is my Omni table calculation column blank or showing #ERROR!?▼

Blank or `#ERROR!` calc columns usually mean the calc failed silently under `swallow_errors: true`. Re-run with `swallow_errors: false` to surface the real error, and check operand order, `for_calc` flags, date truncation, and that every field the calc references is included in `query.fields`.

When should I use raw SQL (userEditedSQL) instead of a topic query in Omni?▼

Use `userEditedSQL` only when no topic can express the query or the user explicitly asks to run SQL as-is. Raw SQL bypasses access grants, row-level access filters, and always_where controls, is invisible to Viewer roles in dashboards, and unbounded results are capped at 50,000 rows.

Why does my Omni date filter not apply in a pivoted query?▼

Some string date filters fail to bind in pivoted queries, returning the same row count as unfiltered. Retry with the typed date-filter object shape (type, kind, left_side, right_side, ui_type), and note that pivoted queries also reject `limit: null` — pass an explicit numeric limit.

How do I run multi-step analysis with Omni's AI instead of writing query JSON?▼

Use `omni ai job-submit` with the model ID and a natural-language prompt, then poll `omni ai job-status` (reading the `state` field until COMPLETE) and retrieve output with `omni ai job-result`. For simple single queries, `omni ai generate-query` returns query JSON synchronously.