What problem does it solve?
Defining semantic models over warehouse tables requires consistent decisions about which columns are dimensions, keys, or measure sources, and mistakes cause validation failures and broken metric compilation. This Skill encodes the OSI (Open Semantic Interchange) core authoring rules so semantic models are generated correctly the first time.
Core Features & Use Cases
- Structural field-role assignment: Classifies columns as dimensions (with a
dimension: block), keys (primary/unique keys and relationship columns), or plain measure-source fields based on SQL usage evidence.
- Key verification discipline: Distinguishes declared physical primary keys from candidate logical keys, requiring full-table validation via
validate_semantic_key_candidates before declaring unique_keys.
- Relationship and time-dimension authoring: Declares relationships inside the semantic model with composite-key correspondence, and assigns exactly one verified time field with a data-derived
time_granularity hint.
- Use Case: Given a monthly loan-quality snapshot table with no declared primary key, generate a valid OSI semantic model where balance columns are plain aggregation fields, code columns are dimensions, and the snapshot date carries a verified monthly granularity.
Quick Start
Ask the agent to generate an OSI semantic model for your fact and dimension tables based on the provided SQL history, then validate and publish it.