
Metabase Ingest
Pulls Metabase questions, models, and metrics into ktx Semantic Layer definitions by mapping result metadata to KSL column types, detecting foreign keys and primary keys, and decomposing pre-aggregated queries. It handles the full conversion pipeline: deduplicating near-identical cards, stitching join graphs, and reacting to provenance from earlier syncs so you don't rewrite the same measures twice. Loads automatically when your WorkUnit contains cards under a Metabase bundle. The identifier verification protocol is thorough, requiring entity_details checks before writing any schema references, which saves you from shipping broken definitions. Most useful when migrating a mature Metabase workspace where tribal knowledge lives in hundreds of saved questions that should become your canonical metric layer.
- GitHub stars
- 1.1K
- last updated
- Jun 11, 2026
Install
$ npx -y skills add kaelio/ktx --skill metabase_ingest --agent claude-codeInstalls into .claude/skills of the current project.
Files
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:
{
"metabaseId": 7,
"name": "Daily orders",
"description": "Orders by day",
"type": "model",
"databaseId": 42,
"collectionId": 5,
"resolvedSql": "SELECT ...",
"templateTags": [{"name": "ref", "type": "card", "cardReference": 10}],
"resultMetadata": [
{"name": "day", "base_type": "type/DateTime", "semantic_type": "type/CreationTimestamp"},
{"name": "order_count", "base_type": "type/Integer"}
],
"collectionPath": ["Data", "Orders Team"],
"referencedCardIds": [10]
}
Sponsors
Details
- Repository
- github.com/kaelio/ktx
- Category
- Frontend Development
- License
- Apache-2.0
- First seen
- Jun 11, 2026