Dimensions
- Last UpdatedFeb 09, 2024
- 6 minute read
A dimension provides contextual information to measures in the AVEVA BI Gateway model. Each dimension typically stores related information. For example, a product dimension can store the product ID, product name, and product description. Product ID, product name, and product description are the fields of the product dimension. Dimension fields are represented by columns of the dimension table in the AVEVA BI Gateway datastore. You can map the dimension fields to source data item fields.
In the AVEVA BI Gateway model, you must provide at least one dimension key for each dimension. The dimension key is a field or a group of fields that uniquely identifies each record of a dimension. You can include a maximum of eight fields in a given dimension key. It is critical to ensure that your dimension key combination will generate unique records. If a duplicable row is found during execution, the complete dimension will be invalidated.
You must specify a refresh rate for a dimension. The AVEVA BI Gateway services extract data from the data sources, transform it, and populate the respective dimension table. Thereafter, the dimension is periodically refreshed as per the refresh rate. You can build a filter expression to filter the required transformed data from external data sources and populate the dimension table in the datastore.
You can add and configure dimension links in a dimension. Dimension links help you relate dimensions between each other. When defining a measure, you can add linked dimensions to the measure context even if the measure source data has no direct reference to the linked dimension. Measure source data will be inferred from the dimension that defined the dimension link.
You can also configure a dimension as time-slicing. Such dimensions define the time periods for which measure calculations will be computed. For example, a shift schedule or Work Order dimension can be configured as a time-slicing dimension through the fields that identify the start and end times of the period they represent.
The first record in the dimension table represents an unknown record. The unknown record is created automatically. It consists of a primary key field equal to 0 and null values in all the associated source data item fields. The unknown record is used in the following scenarios:
-
At run time, the system looks up for each dimension link and measure relationship with the values of the source field(s) used in the link or relationship. These values are then associated with a dimension key value. When the source field value is "Null" or does not exist in the dimension, then the corresponding record or aggregate will reference the unknown dimension record.
-
When you relate a constant value to the dimension key ("Null" is also a constant), then the constant value is attached to all of the aggregates from the source system after the calculation of the aggregates. The resulting dimension key in the measure table points to the relevant dimension record. If the constant value does not exist in the dimension or is "Null", then the corresponding record will reference the unknown dimension record.
Manage dimensions
After you add and configure data sources, you can add and manage dimensions.
The Dimension editor allows you to:
-
Configure Refresh Rate of a Dimension
Quick dimension tutorial videos
Video tutorial: Create a regular dimension object in AVEVA BI Gateway
Welcome! This is a short demo of the Dimensions object within the AVEVA BI Gateway Model Builder.
A dimension provides contextual information to measures in the model.
Each dimension typically stores related information.
In this video, we will look at how to create a basic or a static dimension.
Let us look at how to create a basic dimension.
Go to the Floating Action Button (FAB) and click Dimension.
A new dimension appears.
Enter the name and description.
Next, go to Fields and select the pencil icon.
This step is important as we are now adding a data source to the dimension.
Select the data source icon.
Search for the data source and click the checkbox.
The search result includes the custom queries within data sources and SQL table as well.
Select the required data source.
For this example, let us choose the Asset data source.
Click to select the Preview Source Data button.
The table set of the custom query appears.
Click OK.
The next step is to add fields to the dimension.
You can map the dimension fields to source data item fields.
You have to design the dimension by defining field name and map to the field name returned by the custom query selected.
As a best practice but still optional, it is recommended to keep the field name the same as the name provided from the custom query.
Define the fields that will become the primary key or contribute to a composite key, by clicking the toggle button.
The combination of the fields should contribute to the uniqueness of the record.
A combination of keys is called a composite key.
Once this is over, our Basic Dimension ‘Asset’ is created.
Since it is a basic dimension and there is no time-related information to the asset, you can select the appropriate refresh rate.
The options under the Advanced section are used for time-defining dimensions.
While you can use the Filter Expression option under the Filter section, it is less time-consuming to filter out data from the level of the data source into the custom query itself, rather than applying the filter on top of the whole result set returned by the data source, which subsequently eliminates more data.
The next step is to deploy the dimension.
The dimension has now changed from yellow to green which indicates that it is well configured, deployed and executed.
This video demonstrates how to create a regular dimension object.
Note: 'Regular dimension' is the new term for 'static dimension' as of August 2023.
Video tutorial: Create a time-defining dimension object in AVEVA BI Gateway
In this video, we will look at how to create a time-defining dimension, and then how to link two dimensions in a measure.
The initial dimension-creating process is the same as basic settings of the dimension:
Go to the Floating Action Button (FAB) and click Dimension.
Enter the name and description.
Go to Fields and select the pencil icon.
Then, select the data source icon.
Search for the data source and click the checkbox.
Select the required data source.
For this example, let us choose the Work Order data source.
Click to select the Preview Source Data button.
The table set of the custom query appears.
Click OK.
The next step is to add fields to the time-defining dimension.
The WorkOrderID custom query retrieves and returns records in an organized and timely manner, based on the StartTime and EndTime specified.
Hence, you will have to the make Plant, Asset, and also StartTime to contribute to the uniqueness of the composite keys.
Go to the Advanced section of the dimension and select the Time Slicing checkbox.
This is important, as the dimension is a time-contextual contributor to the measure and enforces the measure calculation to be time-sliced as per the work order events.
The Incremental Update is optional but recommended for a large data set.
You can backfill the dimension from a specified date called Data Collection Start.
In BI Gateway, you have to define the relationship between the time defining dimension and the Asset dimension under the Links section, if they have a common field that needs to be mapped from each other.
This step is particularly important to enable the ContextLink feature in a measure object.
To create a new link, go to the Links section of the dimension selected.
In this video, we are still at the WorkOrder_TimeDefiningDimension.
Click the plus icon and rename as required.
The default name contains ‘FK’ which means foreign key, which is the opposite of the primary key.
The Foreign key points to the destination dimension, which in this case is the Asset_Dimension.
Choose and verify the dimension fields.
The link should be well configured when you have to define the context of a measure.
Create a measure and go to the Context section.
Select the dimensions to define the measure context.
Click the toggle button to enable the link.
It is crucial to have earlier defined the dimension link before, as we did in this video.
This brings us to the end of our dimensions object demo video.
Thank you.
This video demonstrates how to create a time-defining dimension object, and how to link two dimensions.
In This Topic
Related Links
- Add a dimension
- Edit a Dimension
- Deploy and undeploy a dimension
- Delete a dimension
- Manage dimension fields
- Select source data items for a dimension
- Map dimension fields to data item fields
- Manage dimension links
- Configure time-slicing for a dimension
- Configure an incremental update for a dimension
- Configure a filter for a dimension