Model and meaning
Cubes and semantic views
A cube is the technical entity: it points at a table (or a SQL query), declares its joins, and defines measures and dimensions. It is where “where does this number come from” is answered.
A semantic view is the curated layer — a Cube view: a selection of measures and dimensions from one or more cubes, under business names. It is what people and AI query, and what the application navigates by.
The separation matters: a cube may have thirty technical columns while a semantic view exposes the six anyone will actually ask about.
The two halves
Every element and every metric has two definitions, and each one has its own sign-off.
The technical half — the SQL, the joins, the aggregation type. Edited by whoever knows the data (the Modeller role), and edited as what it is: the YAML file. A form that only understood the fields qontexta knows about would be a worse editor than the Semantic Repository itself, so here you edit the file, with the guarantee that it has to remain a valid Cube model.
The business half — what it measures, what it leaves out, in what unit, how to read it, what people call it and which questions it answers. Edited by whoever answers for the number (the Business Owner role), in a form, without seeing SQL.
A metric is ready when both halves are validated. Until then it can still be queried, but the application — and the agent — will say its meaning is not signed off.
What to write in the business half
These fields are not bureaucracy: they are what an agent reads before it picks a metric.
| Field | What it is for |
|---|---|
| Title | What the business calls this. |
| Description | What it is, in a sentence or two. Say what it leaves out, too. |
| Owner | The team that answers for this number if someone questions it. |
| Unit | €, %, orders… what it is counted in. |
| How to read it | Caveats, exceptions, what it should not be confused with. |
| Synonyms | What the business calls the same thing. It helps the AI find it. |
| Questions it answers | The real questions people ask. The AI reads these. |
Validating
Validating the business half requires a title, a description and an owner. The
sign-off is written into the file itself (meta.qontexta), so it travels with the
definition and gets reviewed in the pull request like any other change.
Editing an already validated definition sends it back to pending: if the meaning changed, someone has to say again that it is right.
Who can do what
| Role | Can |
|---|---|
| Modeller | Edit the technical definition, use the assistant, create environments and promote. |
| Business Owner | Edit and validate the meaning. Does not touch SQL. |
| Admin | Everything, plus account settings. |
| Viewer | Query the published model. |