metabase_ingest

Solid

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.

AI & Automation 733 stars 42 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 95/100

Stars 20%
95
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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", "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] } ``` Use `resultMetadata` to: - Map `base_type` to KSL column type: `type/Integer`, `type/Float`, `type/Decimal`, `type/BigInteger` → `number`; `type/Text`, `type/TextLike` → `string`; `type/DateTime`, `type/Date`, `type/DateTimeWithTZ` → `time`; `type/Boolean` → `boolean`. - Identify grain candidates: columns with `semantic_type: type/PK`. - Identify join candidates: columns with `semantic_type: type/FK` plus `fk_target_field_id`. - Identify time columns: `semantic_type: type/CreationTimestamp` or `type/Upd...

Details

Author
Kaelio
Repository
Kaelio/ktx-ai-data-agents-context
Created
3 weeks ago
Last Updated
today
Language
TypeScript
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

metabase_ingest

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.

733 Updated today
Kaelio
AI & Automation Solid

lookml_ingest

Map a LookML view/model/explore into KTX semantic layer sources. Covers the LookML to KTX primitive table, provenance tagging, and three worked examples (overlay, standalone from derived_table, standalone with sql_always_where). Load when the turn contains `.lkml` content.

733 Updated today
Kaelio
AI & Automation Solid

lookml_ingest

Map a LookML view/model/explore into KTX semantic layer sources. Covers the LookML to KTX primitive table, provenance tagging, and three worked examples (overlay, standalone from derived_table, standalone with sql_always_where). Load when the turn contains `.lkml` content.

733 Updated today
Kaelio
AI & Automation Solid

ktx-analytics

Use when answering a question that needs data from a KTX-connected database - investigating, analyzing, "how many", "show me", "what's the breakdown of", finding records by value, exploring tables, comparing periods, explaining metrics, or any data-analysis request. Triggers even when the user does not say "analytics"; if the answer requires querying a configured KTX connection, this skill applies.

733 Updated today
Kaelio
AI & Automation Solid

ktx-analytics

Use when answering a question that needs data from a KTX-connected database - investigating, analyzing, "how many", "show me", "what's the breakdown of", finding records by value, exploring tables, comparing periods, explaining metrics, or any data-analysis request. Triggers even when the user does not say "analytics"; if the answer requires querying a configured KTX connection, this skill applies.

733 Updated today
Kaelio