UtilizationEvents
- Last UpdatedJun 09, 2023
- 2 minute read
This Azure function custom query returns the utilization events.
Note: For the UtilizationEvents custom query expression, the best practice is to use the LastModified parameter in the incremental update feature, instead of StartTime or EndTime parameters. When Incremental update timeframe observes StartTime field, then it considers only events where StartTime matches the incremental update timeframe. Subsequently it excludes all the events that are out of the timeframe, but which have been modified within the same timeframe. Meanwhile, LastModified parameter considers any and all changes with every incremental update. For more information, refer to Configure an Incremental Update for a Dimension.
The custom query expression supports the following parameters:
|
Parameter Name |
Parameter Choice |
Example |
Description |
|---|---|---|---|
|
QueryName |
Required |
UtilizationEvents |
Azure function query name |
|
SelectColumn |
Optional |
["*"] Or [ "Equipment AS EquipmentName", "Namespace AS Namespace", "Location AS Location", "EquipmentState AS State", "UtilizationReason AS Reason", "StartTime", "EndTime" ] |
Option to pick required properties from AVEVA Insight |
|
Equipment |
Required |
{ "Filter": "contains(Location,'Lake Forest')" } |
Equipment expression is used to apply a filter on the equipment to be used to retrieve utilization events. |
|
LastModified |
Optional |
"[RequestedStartTime]" "[RequestedEndTime]" |
Any valid UTC date time value. To fully leverage the LastModified datetime field from MES API resultset, you must subsequently enable the incremental update feature for a dimension by configuring the LastModified field in it. For more information, see Configure an incremental update for a dimension. Note: LastModified is available only for the UtilizationEvents custom query. |
|
Top |
Optional |
"50000" |
Number of records to be retrieved from AVEVA Insight |
The following properties are returned from the Azure function query for "UtilizationEvents".
|
Property Name |
Datatype |
Description |
|---|---|---|
|
StartTime |
DateTime |
The start time of the utilization event. |
|
Equipment |
String |
The equipment name. |
|
Namespace |
String |
The equipment namespace. |
|
Location |
String |
The equipment location. |
|
StateType |
Number |
The equipment state type (1=Idle, 2=Runtime, 3=Downtime). |
|
EquipmentState |
String |
The equipment state name. |
|
UtilizationReason |
String |
The utilization reason name. |
|
Comment |
String |
An event comment. |
|
EndTime |
DateTime |
The end time of the utilization event. |
|
AutomationSource |
String |
The Tag FQN when the utilization event is from data collection (Internal use). |
|
Id |
String |
The UtilizationEvent ID. |
|
_etag |
String |
This an optimistic concurrency tag which prevents overlapping updates to an entity. |
|
LastModified |
DateTime |
The time of modification of the utilization event. |