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

  1. Open Aggregates Configuration tile.
  2. Choose Create to create a new data model.
  3. In General Information settings, enter Name and Description.
  4. 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.

  5. In Measures, choose Create to create new measures.
    1. 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
  6. In Dimensions, choose Create to create new dimensions.
    1. 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.

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

Results

The newly created data model gets added to the list of contextualised models where you can see its Status, Creation Time and Usage Status. You can view complete details when you click on any data model in the list.