metabase_ingest
仓库创建 2026年5月11日最近提交 7 天前SkillHot 收录 20 天前
▸ 精选理由
处理类型映射、主外键检测和去重,适合迁移 Metabase 资源时使用。
▸ 风险提示
需要访问 Metabase 导出文件或数据库元数据,可能包含敏感查询信息。
这个 Skill 做什么
把 Metabase 的 questions、models 和 metrics 转换成 ktx 的语义层源定义。
把 Metabase 的 cards、models 和 metrics 转换成 ktx 的语义层(KSL)源定义,包含 result_metadata 到 KSL 类型的映射、FK/PK 识别、去重和预聚合拆解。适用于把 Metabase 仓库导入到 ktx 时,能自动建立 join 图和字段关联并处理历史同步信息。特别在处理大量 cards/<id>.json 文件时能节省大量手工建模工作。
▸ 展开 SKILL.md 英文原文
Convert Metabase questions, models, and metrics into ktx Semantic Layer source definitions. Covers result-metadata to KSL column type mapping, FK/PK detection, near-duplicate deduplication, pre-aggregation decomposition, join-graph connectivity, and how to react to priorProvenance from earlier ingest syncs. Load when the WorkUnit contains `cards/<id>.json` files under a Metabase bundle.
1.5k
Stars
96
Forks
17
仓库内 Skill
+49
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Kaelio/ktx/main/packages/cli/src/skills/metabase_ingest/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Kaelio/ktx/main/packages/cli/src/skills/metabase_ingest/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Metabase to ktx Semantic Layer
Each WorkUnit represents one Metabase collection's cards for one Metabase database (mapped to exactly one ktx connection). Every `cards/<id>.json` file carries the resolved SQL, result_metadata, card type, collection path, and referenced-card ids. The WU's `sync-config.json` tells you which sync mode is active and which selections apply. `databases/<id>.json` tells you the target ktx connection.
## Context format
Each card JSON looks like:
```json
{
"metabaseId": 7,
"name": "Daily orders",
"description": "Orders by day",
"type": "model",
"databaseId": 42,
"collectionId": 5,
"resolvedSql": "SELECT ...",
"templateTags": [{"name": "ref", "typevia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有