SHL Model Files
Model files define MSL models. In MSL, a model is a metadata layer that overlays a multi-dimensional model format on top of the source tables/views stored in a connected database. A model has a fact semantic table and defines joins with its dimension semantic tables. It can have multiple perspectives that can be deployed to the database and business intelligence semantic layers.
Example:
- name: TPC-H Orders Customer-Nation-Region
definition: Orders fact with snowflake Customer (Nation/Region) dimension
connection: Snowflake TPC-H
fact_semantic_table: Orders
joins:
- to_semantic_table: Customer Nation Region
from_column: o_orderkey
Entity Relationships
---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
`Semantic Model` *-- `Semantic Table`
`Semantic Model` *-- `Join`
class `Semantic Model` {
String connection
String fact [1..1]
Array~Join~ joins [1..1]
}
`MSL Object` <|-- `Semantic Model`
class `MSL Object` {
<<interface>>
String name [1..1]
String description
String objectID
}
Model Properties in Model
connection
- Type: String
- Required: No
The name of the database connection used by this model to retrieve fact and dimension data. When missing, the catalog connection is used.
fact_semantic_table
- Type: String
- Required: Yes
The name of the fact semantic table for this model.
joins
- Type: Array
- Required: Yes
Defines the relationships between the model's fact semantic table and first-order dimension semantic tables. These are called fact joins.
The fact semantic table represents the FROM side, and the dimension semantic tables represent the TO side of joins.
See Join for details.
There is no need to explicitly specify the list of semantic tables the model has. The model automatically includes all semantic tables involved in its joins.
Note: These joins are separate from those defined inside the fact or dimension semantic tables to handle dependent multi-fact and snowflake dimension tables scenarios.