sl

Featured

ktx's semantic layer - a structured catalog of sources (tables/views), measures, joins, and segments expressed as YAML. Covers the schema and how to query it via `sl_query`. Use when the task involves querying pre-defined metrics (ARR, churn, retention, LTV, MAU) or reading SL source YAML to understand the catalog. Capture is handled by the `sl_capture` skill (memory-agent only).

AI & Automation 1,511 stars 97 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 91/100

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

Skill Content

# Semantic Layer ktx's semantic layer (SL) is a structured catalog. Each **source** represents a table, a SQL view, or an overlay that enriches a manifest-backed table with measures, computed columns, joins, and named segments. The catalog is the single source of truth for reusable business metrics. This skill covers two parts: - **Part 1** - Schema reference (what an SL source looks like). - **Part 2** - Querying via `sl_query`. Capture (when and how to add new patterns to the SL) is a separate concern handled by the memory-agent - see the `sl_capture` skill if you are running in capture mode. The research agent **reads** and **queries** the SL via the tools described here; it does not write to it. For capture-time identifier verification, load `sl_capture`. Synthesis writer skills must verify warehouse identifiers with `discover_data`, `entity_details`, and `sql_execution` before emitting table or column names. --- ## Part 1 - Schema reference An SL source is a YAML file under `semantic-layer/<connectionId>/`. The file's `name:` field is the source's identity — it mirrors the warehouse identifier verbatim (e.g. Snowflake's uppercase `SIGNED_UP`); the filename is only a derived label. Always address sources by name through the `sl_*` tools, never by file path. There are three flavors: ### Overlay sources Enrich a manifest-backed table with measures, computed columns, joins, and segments. No `table` or `sql` field. The base table's columns and grain are inherited fro...

Details

Author
Kaelio
Repository
Kaelio/ktx
Created
2 months ago
Last Updated
1 weeks ago
Language
TypeScript
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

sl_capture

How to capture new reusable patterns into ktx's semantic layer - when a measure, segment, or join belongs in the catalog and how to write it generically so it stays small and useful over time. Loaded by the post-turn memory-agent only. The research agent does not write to the SL.

1,511 Updated 1 weeks ago
Kaelio
AI & Automation Listed

bsl-semantic

Author and query a Boring-Semantic-Layer (BSL) model for a Postgres table — dimensions, measures, time-dimension, grain, and joins stored as JSON inside PostgreSQL COMMENT ON TABLE / COMMENT ON COLUMN statements, authored at source via migrations (NOT YAML files). Use when adding semantic comments to a table, writing a BSL-comment migration, choosing a table's grain / dimensions / measures / time-dimension / join keys, translating an existing semantic-model source into table comments, or making a table safely queryable by an LLM agent via structured (not free-SQL) queries. Trigger on "BSL", "semantic layer", "semantic comments", "comment migration", "dimensions and measures", "model this table for analytics", "grain of this table", or "make this table queryable by the agent".

2 Updated today
petermcalister
AI & Automation Featured

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.

1,511 Updated 1 weeks ago
Kaelio