Skip to content

Creating a Model Extension

This optional step allows you to add new entities to the project, which can only be a subset of the entities managed by the system. In this page you can add a new entity to those that already exist to customize the OOTB model. Every extension is specific to the project. You can create physical entities that are reflected in tables in the Manufacturing Data Warehouse, or virtual entities that are reflected in views. Creating virtual entities can be useful during the analysis phase, when it is necessary to perform a series of joins between different tables that cannot be executed by the business intelligence analysis tool. It is also convenient for exposing these complex processes via OData. Virtual entities cannot be contextualized automatically.

Procedure

  1. On the "Project" page, select the "Model Extensions" tab.
  2. Click "Create Model Extension".
  3. Insert a meaningful name that you want to assign to the model extension and, optionally, a description to provide further information. You cannot use the name of a standard entity or an existing model extension.
  4. (Optional) Select the "Is Virtual Entity" checkbox if you want to create a model extension that is not a physical table but only a view into the data warehouse.
  5. (Only for physical entities) Select the "Granularity Type", which provides the system with the information necessary to estimate space and index requirements for the entity, together with the capacity to optimize the access to this entity. The three following types of granularity have been defined:
    • "Small": entities that typically amount to a few dozen/hundred records, such as classification, type or state entities.
    • "Standard": entities that amount to a few thousand records and that typically represent analysis contexts such as equipment, material definition, labor, etc.
    • "Large": entities that exceed hundreds of thousands or millions of records, typically entities that represent facts.
  6. Select the "Entity Type", which can be one of the following:
    • "Analytical Context": dimension tables, which contain descriptive attributes. Each dimension table has a single field primary key (PK) which has a one-to-many relationship with a foreign key (FK) in the fact table. As a consequence, dimensions can only contain textual data.
    • "Analytical Fact": a fact table, which contains measurable, quantitative data about the business. The fact table can only include numerical data and relationships with Analytical Context.
    • "Generic Entity": entity type that is not strictly related to star schema modeling but that permits to model entities that contain both numeric and textual information useful for the generation of reports. If you select this entity type, you can add columns of any type, i.e. all the types available for Analytical Facts and Analytical Context entity types and relationships with Analytical Context.
  7. (Optional - Only for non-virtual entities) If you have selected the Analytical Fact or the Generic Entity type, you can contextualize the model extension.
  8. Insert the "Column Name".
    • For physical entities the [Name]Id, [Name]SiteId, [Name]Key, RowUpdated and RowInserted columns are automatically added.
    • For virtual entities, only the [Name]Id column is automatically added.
  9. Select the "Column Type". Depending on the entity type you have previously selected, it can be one of the following. Depending on the Entity Type you have selected, the Column Type drop-down list may contain columns of type datetime.
  10. Click "Add Column".
  11. Click "Save".

Column types

Analytical Facts and Generic Entity

Relationship: To set a relationship with another entity.
If you have added a Relationship column to an extension of analytical fact type, you can only set a relationship with an analytical context. On the contrary, if you have created an extension of analytical context type, you cannot set any relationship. If a Relationship column is added, the name of the column always ends with the name of the unique identifier of the target context (e.g. if the target context is Equipment, the name always ends with EquipmentId) and the name provided for the user is used as a prefix.

Quantity: Numeric value (float) that can be aggregated by any type of aggregation (for example by a sum, average, min, max...) on the basis of a time dimension and of any other type of dimension.

Level Quantity: Numeric value (float) that implicitly expresses the Sum aggregation based on time from the moment 0 to NOW. Therefore it provides the total quantity compared to the latest check. The Sum aggregation can only be used for non-time dimensions. All other aggregations can be performed on the basis of all possible dimensions (including time dimensions). For example, this value can express the liters of liquid in a tank at a certain moment.

Example

In a plant, two different tanks contain a liquid which can be either added to the tank or removed from it.

  • Tank 1 contains 5 liters at 10 a.m. and 7 liters at 11 a.m.
  • Tank 2 contains 8 liters at 10 a.m. and 4 liters at 11 a.m.

If you add 5 to 7, the result is not meaningful, because you would aggregate the values by a sum on the basis of a time dimension. However, if you add 5 to 8, you can obtain the average number of liters available in the plant at 10 a.m., i.e. the aggregation is based on a non-time dimension.

Unitary Quantity: Numeric value (float). The two following types exist:

  • Measures that express a value compared to another unitary quantity (pieces per second, Euros per piece, etc.).
  • Measures that can never be added together (for example temperature, humidity, etc.).

These measures can never be aggregated by a sum, neither for time dimensions nor for non-time dimensions. Other aggregation functions, such as Average, Min and Max, can however be used for any type of dimension (including time dimensions). These types of quantity can be aggregated using a Sum when they are multiplied by a numeric value they have a relationship with.

Example 1

The unitary quantity "pieces per second" can be aggregated for time and non-time dimensions after you have multiplied it by the time required for the analysis. If a piece of equipment produces 5 items per second and you multiply it by 10 seconds you obtain 50 pieces, which is a quantity value that can be used for any type of dimension and aggregation.

Example 2

The temperature of two different equipment units (ovens) is measured by means of two sensors. You can calculate the Average, Min or Max temperature at a specific time, but it would make no sense to add the temperatures together.

Duration: Numeric value that contains information about the duration.

StartDateTime: Starting date and time of an event. For this field the UTC format must be applied. Local time columns are automatically added by the system for each UTC time column.

EndDateTime: Ending date and time of an event. For this field the UTC format must be applied. Local time columns are automatically added by the system for each UTC time column.

EventDateTime: Precise date and time of an event. For this field the UTC format must be applied. Local time columns are automatically added by the system for each UTC time column.

Analytical Context and Generic Entity

Name: Field of "nvarchar" type that is used to create a column in the data warehouse to manage specific types of textual information. Identifies a property of 255 characters in length. This field is always mandatory ("not null").

Description: Field of "nvarchar" type that is used to create a column in the data warehouse to manage specific types of textual information. Identifies a property of 1000 characters in length.

Note: Field of "nvarchar" type that is used to create a column in the data warehouse to manage specific types of textual information. Identifies a property of 4000 characters in length.

TextAttribute: Field of "nvarchar" type that is used to create a column in the data warehouse to manage specific types of textual information. Identifies a property of 255 characters in length.

Deleting data when a relationship with other entities has been set

If you want to delete a non-virtual extension and have previously set a relationship between this extension and other entities, the deletion must be performed first for the entities that have a relationship with it and then for the entity itself.

Example

You have created a model extension for the "Manufacturer" entity and an entity extension for the "Equipment" entity. You have then set a relationship in the "Equipment Extension" to the "Manufacturer".
If you want to delete the Manufacturer entity, you have to delete Equipment first, or remove the relationship between Manufacturer and Equipment, and then delete Manufacturer, otherwise the deletion fails.


Last update: October 26, 2026