omni-to-databricks-metric-view

Convert Omni Analytics topics into Databricks Metric View definitions in Unity Catalog.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams maintaining metrics in Omni Analytics often need those same definitions hardened into Databricks Unity Catalog for AI/BI dashboards and Genie spaces, but manually translating topics, joins, dimensions, and measures into Metric View YAML is error-prone and slow. ## Core Features & Use Cases - Automated Model Exploration: Fetches the Omni shared model, topic files, relationships, and view definitions via the Omni CLI to build an accurate source picture. - Field Translation: Maps Omni dimensions (timeframes, groups, bins, durations, yesno) and measures (aggregates, derived, filtered) into Databricks Metric View YAML with correct formats and quoting rules. - Execution & Validation: Detects existing metric views, generates CREATE OR ALTER SQL, executes through the Databricks SQL Statements API, and grants access with troubleshooting guidance. - Use Case: Convert the Omni orders topic into main.sales.orders_mv so Databricks Genie spaces and AI/BI dashboards query the same governed metrics defined in Omni. ## Quick Start Ask the assistant to convert your Omni orders topic into a Databricks Metric View in the main.sales schema using your configured Omni and Databricks CLI profiles.

Frequently Asked Questions about omni-to-databricks-metric-view

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

FAQPage Schema
How do I convert an Omni topic to a Databricks Metric View?▼

Fetch the topic, relationships, and view files from the Omni shared model using the Omni CLI, map fields to Metric View YAML dimensions and measures, then execute CREATE OR REPLACE VIEW ... WITH METRICS LANGUAGE YAML through the Databricks SQL Statements API.

How are Omni measures mapped to Databricks metric views?▼

Omni aggregate types map directly: sum to SUM(col), count to COUNT(*), count_distinct to COUNT(DISTINCT col). Derived measures use MEASURE() composition with atomic measures defined first, and filtered measures use FILTER (WHERE condition).

Does the skill support Omni timeframes and dimension groups?▼

Yes. Omni time dimensions with timeframes become one DATE_TRUNC dimension per timeframe, groups become CASE WHEN expressions, bins become range CASE expressions, and durations become DATEDIFF expressions.

Why does my metric view creation fail with METRIC_VIEW_INVALID_VIEW_DEFINITION?▼

This error means an invalid YAML field or value was used. Common causes are using description instead of comment, including unsupported decimal_places, or forgetting to single-quote the reserved word 'on' in join definitions.

What are the limitations of Databricks metric views from Omni?▼

Views backed by derived_table.sql have no physical table and are skipped, columns from nested joins cannot be used in expr, MAP type columns are unsupported, and the list aggregate type has no metric view equivalent.