Modeling concepts
Read The foundations of Semantic Hub metric modeling for an illustrated introduction to grain, aggregation, calculation context, and the established theory behind the model.
A catalog contains connections, datasets and models. A connection identifies a data source. A dataset describes rows from that source, including fields, keys and relationships. A semantic model selects the datasets and definitions to expose together.
The grain of a dataset describes what one row represents. Choose keys that match the data, and declare relationship cardinalities accurately. Joining a row to several matching rows can multiply values; a relationship declaration is therefore part of a model's meaning, not just a navigation aid.
A metric defines a reusable calculation. Defining a metric once helps queries use a consistent calculation. A query selects fields and metrics and can restrict its results with filters.
Use the getting-started example to see these ideas together. Consult the schema reference for exact properties, and limitations before relying on advanced constructs on a particular target.