-
Notifications
You must be signed in to change notification settings - Fork 4
0. Star Schema
The star or snowflake schema forms the analytical model that will be used in analytical queries. In this chapter (0), we introduce all related development artifacts before applying the model in various analytical queries in the following chapters (1 and following).
The cube is the core of the analytical model. It consolidates all required measures and dimensions and defines the model’s functionality.
The cube view is a view entity annotated with @Analytics.dataCategory: #CUBE.
Example:
/DMO/ANA_I_FlightCube
Dimension fields in the cube view contain only IDs (e.g., airline ID). Additional attributes (such as airline name and city) are provided by dimension views.
A dimension view is a view entity annotated with@Analytics.dataCategory: #DIMENSION.
It is referenced in the cube view using @ObjectModel.foreignKey.association.
Examples:
- City: /DMO/ANA_I_City
- Connection: /DMO/ANA_I_Connection
- Airport: /DMO/ANA_I_Airport
- Carrier (Airline): /DMO/ANA_I_Carrier
Hierarchies enable the hierarchical display of dimension data (e.g., airports by region and country). A hierarchy consists of several artifacts:
-
Hierarchy Directory View
Acts as a directory if there are hierarchy variants. The example contains two variants to group airports:
Variant 1: Geographical grouping (World → Region → Country → Airport)
Variant 2: Alphabetical grouping (similar to an address book)
The hierarchy directory view contains the header information of the variants like ID and Text.
Example: /DMO/ANA_I_AirportHierDir -
Hierarchy Base View
Defines the hierarchy by establishing parent-child relationships via self-association, linking the directory view, and associating dimension and text views.
Example: /DMO/ANA_I_AirportHierBase -
Hierarchy Definition
Constitutes the hierarchy using the base view as a source and arranges elements semantically.
Example: /DMO/ANA_I_AirportHier -
Hierarchy Node View
Lists all hierarchy nodes used in different variants. Is used in the base view to define the node type (optional).
Example: /DMO/ANA_I_AirportHierNode
Finally, the hierarchy is referenced in a dimension view using @ObjectModel.association.toHierarchy.
Example: /DMO/ANA_I_Airport
Further Reading: Blog Post: How to define a CDS based hierarchy
Text views provide texts for dimension fields and are annotated with @ObjectModel.dataCategory: #TEXT. The field(s) containing the text are annotated with @Semantics.text: true. If the texts are language-dependent, the additional language field must be annotated with @Semantics.language: true.
Text views are typically used in dimensions fields using the @ObjectModel.text.association annotation.