Skip to content

0. Star Schema

Andreas Riehl edited this page Nov 21, 2025 · 15 revisions

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).

Cube View

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 Views

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:

Hierarchies

Hierarchies enable the hierarchical display of dimension data (e.g., airports by region and country). A hierarchy consists of several artifacts:

  1. 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

  2. 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

  3. Hierarchy Definition
    Constitutes the hierarchy using the base view as a source and arranges elements semantically.
    Example: /DMO/ANA_I_AirportHier

  4. 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

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.

Clone this wiki locally