The semantic layer
The semantic layer holds a model of your warehouse, made of datasets, fields, relationships and metrics, and answers questions asked in that model's own words.…
Datasets
A dataset is one source in your warehouse, either a table or a read-only query, and it owns that source's fields and its outgoing relationships. A dataset…
Fields
A field is a named scalar expression over its dataset's source. Fields are what a query groups and filters by, and what a metric aggregates.
Relationships
A relationship is a to-one link from one dataset to another: each row of the first matches at most one row of the second. It is declared inside the dataset it…
Filters
A filter keeps the rows that match a condition. It is written one way in a metric's definition and another way in a query, and both follow the same rules.
Metrics
A metric is a governed number. It is either one aggregation over a dataset or arithmetic over other metrics. It belongs to one domain, and a query asks for it…
Caching
A metric can be served from a cube: a table of the metric already totalled by a few dimensions and a time bucket, kept up to date on a schedule. A question the…
Domains
A domain is one use case, such as commerce or logistics. It is what a query names in FROM. It chooses which datasets, fields and links its users can see, owns…
Semantic SQL
Semantic SQL is how you ask the layer a question. It is SQL whose table is a domain, whose columns are the domain's fields, and whose aggregates are its…
Fields and paths in SQL
A query names every field with its dataset, dataset.field, and the layer joins it from each metric's anchor. When there is more than one way to reach that…
Time
In a semantic select, time is each metric's own time axis: the moment each of its rows happened, read in the question's time zone. You bound it with a window…
Composing queries
A semantic select answers one question over one domain. To compare periods, rank, compute a share or join two questions, put each semantic select in a CTE and…
Answers
An executed statement returns a table, columns and rows, plus what you need to trust it: where it came from, the window and time zone it used, what each column…
Names and changes
A query spells names: FROM commerce, MEASURE(revenue), orders.region. A saved query, a data app and a cube all keep working only while those names do. So the…
Errors
Every refusal has a stable code, a message that says what to write instead, and details such as the field, did_you_mean or a maximum. A query error is a 422…