
Lookml Ingest
Map a LookML view/model/explore into ktx semantic layer sources.
Install
npx skills add Kaelio/ktx --skill lookml_ingest -g -a claude-code -y- Repository
- Kaelio/ktx1.6k
- Category
- Engineering
- Updated
- 13d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,523 tokens
- Runs scripts
- No, instructions only
What it does
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.
LookML to ktx Semantic Layer
LookML views map to SL sources, measure: to measures, explore: { join: } to the join graph. This skill lays out the mapping and the three capture shapes.
Mapping table
| LookML | ktx form | Notes |
|---|---|---|
view: X { sql_table_name: …; measure:/dimension:/join: } | Overlay named X with measures, computed-only columns, column_overrides, joins, segments | Manifest-backed; inherit grain/columns |
view: X { derived_table: { sql: … } } | Standalone with top-level sql:, explicit grain: + columns: | No manifest entry exists |
view: X { sql_always_where: <p> } | Standalone with sql: SELECT * FROM <base> WHERE <p> | Enforcement, not opt-in |
explore: { join: Y { sql_on: …; relationship: … } } | joins: entry { to: Y, on: "<local> = Y.<col>", relationship: … } | On the overlay or standalone |
conditionally_filter / always_filter | segments: [{ name, expr }] | Callers reference by name |
| Manifest entry | _schema/*.yaml | Never edit - auto-imported |
Type map: date/datetime/timestamp → time; yesno → boolean; number → number; string → string. Ignore drill_fields: (UI only).
Decision rules
LookML writes target the run connection directly. Unlike Looker runtime ingestion, the LookML adapter is configured on the warehouse ktx connection, so do not look for targetWarehouseConnectionId and do not route through a mapping array.
Before any SL write, inspect the WorkUnit notes.
If notes contain:
[LOOKML SL WRITES DISALLOWED]
reason: lookml_connection_mismatch
...
[/LOOKML SL WRITES DISALLOWED]
