Token导航 LogoToken导航

Agent Skill · 研究检索

omni-to-databricks-metric-view(全方位到 databricks 指标视图)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

omni-to-databricks-metric-view 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 52,038。

总安装 565周安装 8GitHub Stars 12下载 65核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:omni-to-databricks-metric-view(全方位到 databricks 指标视图)
来源仓库:https://github.com/exploreomni/omni-agent-skills
仓库路径:skills/omni-to-databricks-metric-view
安装命令:
npx skills add https://github.com/exploreomni/omni-agent-skills --skill omni-to-databricks-metric-view
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/exploreomni/omni-agent-skills --skill omni-to-databricks-metric-view

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

omni-to-databricks-metric-view 用于辅助数据整理、表格处理和指标计算,适合清洗字段、汇总数据和生成统计说明。适用于 CSV/Excel 分析和图表准备的场景。使用时需确认数据来源、字段含义和时间范围,避免将样本当作全量事实。涉及敏感数据或导出文件时,应先确认权限和脱敏边界。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/omni-to-databricks-metric-view

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/exploreomni/omni-agent-skills --skill omni-to-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

omni-to-databricks-metric-view 怎么安装?

在终端执行 npx skills add https://github.com/exploreomni/omni-agent-skills --skill omni-to-databricks…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

omni-to-databricks-metric-view 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

omni-to-databricks-metric-view 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

omni-to-databricks-metric-view 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

omni-to-databricks-metric-view 用的人多吗?

公开数据是累计安装 565 次,近一周安装 8 次,下载 65 次,GitHub 12 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

omni-to-databricks-metric-view 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
omni-to-databricks-metric-view

全方位到 databricks 指标视图 · 本页

56512需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Omni → Databricks Metric View

Converts an Omni topic into a Databricks Metric View by exploring the Omni model via API, translating its field definitions into the Databricks Metric View embedded YAML format, and executing via the Databricks CLI.

See FIELD-MAPPING.md for full before/after translation examples and YAML-REFERENCE.md for the complete YAML structure, aggregate type, and format mapping tables.


Prerequisites

# Verify the Omni CLI is installed — if not, ask the user to install it
# See: https://github.com/exploreomni/cli#readme
command -v omni >/dev/null || echo "ERROR: Omni CLI is not installed."
# Show available profiles and select the appropriate one
omni config show
# If multiple profiles exist, ask the user which to use, then switch:
omni config use <profile-name>
# Databricks CLI — verify installed and check profiles
databricks --version
cat ~/.databrickscfg

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).

Workflow

Step 1 — Gather Requirements

Ask the user:

  1. Which Omni topic do they want to convert? (e.g., orders)
  2. What is the Unity Catalog destination? (catalog.schema) (e.g., main.sales)
  3. What is the Databricks SQL Warehouse ID? (run databricks sql warehouses list to find it)
  4. Is this a new metric view or does one already exist at catalog.schema.[topic_name]_mv?
  5. Which Databricks CLI profile to use (optional — only if the user has multiple profiles)?
⚠️ STOP — Confirm all answers before proceeding. The metric view will be named [topic_name]_mv by default.

Step 2 — Explore the Omni Model

2a. Find the model ID
omni models list --modelkind SHARED

Identify the Shared Model and note its id. Always prefer the Shared Model over Schema or Workbook models.

2b. Fetch the topic file
omni models yaml-get <modelId> --filename <topic_name>.topic

From the topic file extract: base_view, joins, fields, always_filter, ai_context, sample_queries.

2c. Fetch the relationships file
omni models yaml-get <modelId> --filename relationships
2d. Fetch each view file referenced in the topic

For every view in base_view and joins:

omni models yaml-get <modelId> --filename <view_name>.view
If a view is prefixed with omni_dbt_, fetch the file starting with omni_dbt_. Skip any view backed by derived_table.sql — it has no physical table.

Step 3 — Identify Tables and Joins

Map view names to fully-qualified Databricks table references (catalog.schema.table):

Omni view nameDatabricks table
ecomm__order_itemscatalog.ecomm.order_items
omni_dbt_ecomm__order_itemscatalog.ecomm.order_items (strip omni_dbt_)

The __ separator maps to schema (left) and table (right). Confirm the catalog prefix with the user.

The joins indentation defines the join chain — a view indented beneath another joins into its parent:

joins:
  user_order_facts: {}          # skip — derived CTE
  ecomm__users: {}              # joins to base_view
  ecomm__inventory_items:       # joins to base_view
    ecomm__products:            # joins to inventory_items

Find the dimension with primary_key: true in each view — list it first among that table's dimensions.

✋ STOP — Confirm the full table list and join hierarchy with the user before continuing.

Step 4 — Resolve the Field List

SyntaxMeaning
*(no fields parameter)*Include all fields from all views
all_views.* / view.*Include all fields from all views / named view
tag:<value>Include all fields with this tag
view.fieldInclude this specific field
-view.fieldExclude this field (always wins over wildcard inclusions)

Process inclusions first, then apply exclusions. Also remove any field with hidden: true unless explicitly included by name.


Step 5 — Build Join Definitions

Using the hierarchy from Step 3 and relationships.yaml, extract join columns from on_sql and build the on: clause. Use the view name as the join name.

Star schema (single-level):

joins:
  - name: ecomm__users
    source: catalog.ecomm.users
    'on': source.user_id = ecomm__users.id

Snowflake schema (multi-hop):

joins:
  - name: ecomm__inventory_items
    source: catalog.ecomm.inventory_items
    'on': source.inventory_item_id = ecomm__inventory_items.id
    joins:
      - name: ecomm__products
        source: catalog.ecomm.products
        'on': ecomm__inventory_items.product_id = ecomm__products.id
⚠️ on is a YAML 1.1 reserved word — always single-quote the key as 'on':. Columns from nested (2+ level) joins cannot be used in expr — flatten them through a denormalized direct join instead.

Step 6 — Map Dimensions and Measures

For each field that survived Step 4, translate it using the rules below. See FIELD-MAPPING.md for full examples.

Dimension quick reference:

Omni field typeDatabricks translation
Standard string/numberexpr: COLUMN
type: time (no timeframes)Single timestamp dimension
type: time + timeframesOne DATE_TRUNC(...) dimension per timeframe
groups:CASE WHEN... END expression
bin_boundaries:CASE WHEN range expression
duration:DATEDIFF(unit, start, end) expression
type: yesnoBOOLEAN dimension (not a filter; omit data_type)

Measure quick reference:

Omni measure typeDatabricks translation
aggregate_type: sum/avg/max/minSUM(col) / AVG(col) / etc.
aggregate_type: countCOUNT(*)
aggregate_type: count_distinctCOUNT(DISTINCT col)
Derived (refs other measures)MEASURE(measure_a) op MEASURE(measure_b) — define atomics first
filters: on a measureAGG(col) FILTER (WHERE condition)

Strip Omni's ${view.column} refs to bare column names (or join_name.column for joined fields). Use display_name for the Omni label, comment for description, and carry synonyms directly. See YAML-REFERENCE.md for format and aggregate type mapping tables.

If the topic has ai_context, carry it into the metric view's top-level comment.

✋ STOP — Review all dimensions, measures, and join definitions with the user before generating the final output.

Step 7 — Check for Existing Metric View

databricks api post /api/2.0/sql/statements \
  --json "{\"warehouse_id\": \"<WAREHOUSE_ID>\", \"statement\": \"SHOW VIEWS IN <catalog>.<schema> LIKE '%_mv'\", \"wait_timeout\": \"30s\", \"catalog\": \"<CATALOG>\", \"schema\": \"<SCHEMA>\"}"
  • View does not exist → use CREATE OR REPLACE VIEW... WITH METRICS
  • View already exists → use ALTER VIEW... AS $$... $$

Step 8 — Generate and Execute the SQL

Write the SQL to a temp file:

-- CREATE (new view)
CREATE OR REPLACE VIEW catalog.schema.orders_mv
WITH METRICS
LANGUAGE YAML
AS $$
version: 1.1
comment: "..."
source: catalog.ecomm.order_items

joins:
  - name: ecomm__users
    source: catalog.ecomm.users
    'on': source.user_id = ecomm__users.id

dimensions:
  - name: id
    expr: id
    display_name: "Order ID"

  - name: status
    expr: status
    display_name: "Order Status"

measures:
  - name: order_count
    expr: COUNT(*)
    display_name: "Order Count"

  - name: total_sale_price
    expr: SUM(sale_price)
    display_name: "Total Sale Price"
    format:
      type: currency
      currency_code: USD
$$
-- ALTER (existing view)
ALTER VIEW catalog.schema.orders_mv AS $$
version: 1.1
...
$$

Execute via the SQL Statements API (databricks sql execute does not exist in CLI v0.295.0+):

databricks api post /api/2.0/sql/statements \
  --json "{
    \"warehouse_id\": \"<WAREHOUSE_ID>\",
    \"statement\": $(cat /tmp/orders_mv.sql | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))'),
    \"wait_timeout\": \"50s\",
    \"catalog\": \"<CATALOG>\",
    \"schema\": \"<SCHEMA>\"
  }"

Check the response for "state": "SUCCEEDED". If "state": "FAILED", read status.error.message and see the Troubleshooting section below.

✋ STOP — Confirm which group or user should receive access before running the GRANT. This is a permission change visible to others.

Grant access:

databricks api post /api/2.0/sql/statements \
  --json "{\"warehouse_id\": \"<WAREHOUSE_ID>\", \"statement\": \"GRANT SELECT ON VIEW catalog.schema.orders_mv TO \`group_name\`\", \"wait_timeout\": \"30s\", \"catalog\": \"<CATALOG>\", \"schema\": \"<SCHEMA>\"}"

Troubleshooting

When the SQL Statements API returns "state": "FAILED", read status.error.message:

Error message containsLikely causeFix
METRIC_VIEW_INVALID_VIEW_DEFINITIONInvalid YAML field or valueCheck the field name against the valid keys (name, expr, display_name, comment, synonyms, format). Common mistakes: using description instead of comment, unsupported decimal_places.
warehouse not running / RESOURCE_DOES_NOT_EXISTWarehouse is stopped or wrong IDStart the warehouse in the Databricks UI or verify the ID with databricks api get /api/2.0/sql/warehouses.
PERMISSION_DENIEDThe CLI profile lacks privilegesCheck the profile's permissions on the catalog/schema with databricks api get /api/2.0/unity-catalog/permissions/....
TABLE_OR_VIEW_NOT_FOUNDA source or join table doesn't exist in Unity CatalogVerify each table reference with SHOW TABLES IN <catalog>.<schema>.
on parse error / unexpected keyon: not quotedAlways write 'on': (single-quoted) — it is a YAML 1.1 reserved word.
wait_timeout value errorTimeout out of rangewait_timeout must be between 5s and 50s.

If the error message is truncated, run the same statement with "wait_timeout": "5s" to get the full synchronous error response.


Critical Rules

  1. Naming: Name the metric view [topic_name]_mv (snake_case, lowercase)
  2. CREATE vs ALTER: Check for existence first — CREATE OR REPLACE for new, ALTER VIEW for existing
  3. Version: Always use version: 1.1 (requires Databricks Runtime 17.2+)
  4. Skip derived CTEs: Views with derived_table.sql have no physical table — skip and warn the user
  5. Confirm before executing: Show the full generated SQL to the user before running
  6. Boolean fields: Map type: yesno as BOOLEAN dimensions — not filters. data_type is not a valid field — omit it
  7. Composed measures: Use MEASURE() syntax; define atomic measures before composed ones
  8. YAML quoting: on is a YAML 1.1 reserved word — always write 'on': (single-quoted)
  9. No SELECT *: All fields must be explicitly defined
  10. MAP columns: Skip joins to tables containing MAP type columns — not supported
  11. Nested join refs: Only direct star join columns (1 level) can be used in expr. Flatten snowflake schema joins through a denormalized direct join
  12. Warehouse ID required: Always confirm before execution — cannot be inferred
  13. Exclusions win: -view.field always overrides any wildcard inclusion
  14. Format type values are lowercase: number, currency, date, date_time, percentage, byte
  15. Date format required: type: date and type: date_time both require date_format
  16. Currency format: Use currency_code: USD not iso_code: USD
  17. decimal_places unsupported: Omit it entirely — causes a parse error
  18. CLI execution: Use databricks api post /api/2.0/sql/statements; wait_timeout must be 5s–50s
  19. Omni CLI flag: Use --filename (not --file-name)
  20. Field description key: Use comment: not description: — description is not a recognized field and causes a parse error

Reference

平台分布

Codex

36.56%
按下载量换算24

Claude

30.55%
按下载量换算20

Cursor

16.16%
按下载量换算11

Gemini CLI

9.1%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills