Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ BI Gateway

ContextEvents for time defining dimension

  • Last UpdatedFeb 09, 2024
  • 2 minute read

This Azure function custom query returns the TDD context events. The custom query expression supports the following parameters:

Parameter Name

Parameter Choice

Example

Description

QueryName

Required

TDDContextEvents

Azure function query name

SelectColumn

Required

["*"]

Or

["Namespace","Equipment","PropertyName","StartTime as StartTime","StartTime as EndTime"]

Option to pick required properties from MES

Filter

Required

"endswith (myFilter,'')"

Expression to apply filter on the TDD Context events.

StartDateTime

Optional

"[RequestedStartTime]"

Any valid UTC date time value.

To leverage [RequestedStartTime] parameter for populating a time defining dimension, you must enable incremental update feature for the dimension. For more information, see Configure an incremental update for a dimension.

EndDateTime

Optional

"[RequestedEndTime]"

Any valid UTC date time value.

To leverage [RequestedEndTime] parameter for populating a time defining dimension, you must enable incremental update feature for dimension. For more information, see Configure an incremental update for a dimension.

Data transformation for TDDContextEvents

The TDD Dimension requires StartTime and EndTime. However, the AVEVA Insight ContextEvents endpoint returns the following data, which does not comprise of the pre-defined EndTime.

Namespace

Equipment

StartTime

PropertyName

New York Plant

BottleLine001

2020-08-01T00:00:00Z

Shift

New York Plant

BottleLine001

2020-08-01T08:00:00Z

Shift

New York Plant

BottleLine001

2020-08-02T00:00:00Z

Shift

New York Plant

BottleLine001

2020-08-02T08:00:00Z

Shift

New York Plant

BottleLine001

2020-08-03T00:00:00Z

Shift

New York Plant

BottleLine001

2020-08-03T08:00:00Z

Shift

The AVEVA Insight Adapter processes the data returned by the ContextEvents endpoint. The processing is based on the rule that the timestamp of the current record of the same Namespace/Equipment/PropertyName is considered as the previous record's end time (EndTime field from the table below). For example, the data shown in the above table is processed by the AVEVA Insight Adapter and is returned as follows.

Namespace

Equipment

StartTime

EndTime

PropertyName

New York Plant

BottleLine001

2020-08-01T00:00:00Z

2020-08-01T08:00:00Z

Shift

New York Plant

BottleLine001

2020-08-01T08:00:00Z

2020-08-02T00:00:00Z

Shift

New York Plant

BottleLine001

2020-08-02T00:00:00Z

2020-08-02T08:00:00Z

Shift

New York Plant

BottleLine001

2020-08-02T08:00:00Z

2020-08-03T00:00:00Z

Shift

New York Plant

BottleLine001

2020-08-03T00:00:00Z

2020-08-03T08:00:00Z

Shift

New York Plant

BottleLine001

2020-08-03T08:00:00Z

9998-12-31T23:59:59Z

Shift

Related Links
TitleResults for “How to create a CRG?”Also Available in