Creating a Data Model
Create or define a new data model using SAP IoT objects
Context
This section explains the flow of data model creation or definition. The data model definition comprises of Dimensions, Measures, and Aggregate Window.
Procedure
- Open Aggregates Configuration tile.
- Choose Create to create a new data model.
- In General Information settings, enter Name and Description.
- In Basic Settings, enter parameter values, such as, Aggregation Window, Lag Period, and Time Window, to configure the model.
Parameter Description Aggregation Window Aggregates are generated based on the specified time window. Possible values are HOURLY, DAILY, WEEKLY, MONTHLY. Lag Period Specifies the duration of the lag incase ingestion delay was known upfront. Possible values are HOUR and DAY.
Enter a numeric value for HOUR or DAY that you select from drop-down.
Time Window Specifies the duration of the data model retention period. Possible values are DAY, MONTH.
Enter a numeric value for DAY or MONTH that you select from drop-down.
- In Measures, choose Create to create new measures.
- Enter the measure details.
Measure Attributes Parameter Description Measure Name User-defined name of the measure Catalog Type Name of the catalog type. Currently, the supported value is ThingType. Catalog Name of the catalog for the selected catalog type Dataset Name of the dataset for the selected catalog Property Name of the property for the selected dataset Aggregation Type Aggregation type of the measure. Possible values are COUNT, SUM, MIN, MAX Supported Aggregation Types Aggregation Type Description COUNT Computes number of times a property has values occurred in the defined time period SUM Computes sum of all values of a property in the defined time period MIN Computes minimum value of a property in the defined time period MAX Computes maximum value of a property in the defined time period
- Enter the measure details.
- In Dimensions, choose Create to create new dimensions.
- Enter the Dimension details.
Dimension Attributes Parameter Description Measure Name User-defined name of the measure Catalog Type Name of the catalog type. Currently, the supported value is ThingType. Catalog Name of the catalog for the selected catalog type Dataset Name of the dataset for the selected catalog Property Name of the property for the selected dataset Allow Propagation By default the option is selected.
This option enables the association of last known value of this dimension to the measures in the data model while aggregates are being computed. This happens when the dimension does not have values in the same timestamp of the selected measures.
It is recommended to uncheck this option while creating timeseries dimensions.
- Enter the Dimension details.
- You may choose to first save the data model and then activate it or directly activate the data model.
- Choose Save to save the data model.
The data model created will be of status NEW.
- Choose Activate to directly activate the data model.
This will automatically save your data model and trigger activation for aggregate generation. The data model created will be of status ACTIVE when the activation is complete.
- Choose Save to save the data model.