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

AVEVA™ BI Gateway On-Premises

ProcessValues for Time Defining Dimension

  • Last UpdatedMar 14, 2022
  • 3 minute read

This Azure function custom query returns the process values for the time defining definitions (TDD). The custom query expression supports the following parameters:

Parameter Name

Parameter Choice

Example

Description

QueryName

Required

TDDProcessValues

Azure function query name

SelectColumn

Optional

["*"]

Or ["FQN","OpcQuality","Text","Value", “DateTime AS StartTime","DateTime AS EndTime"]

Option to pick required properties from AVEVA Insight.

Note: The previous record of same FQN’s DateTime is considered as current record StartTime, and current record DateTime is considered as Endtime.

DistinctColumn

Required

["FQN","OpcQuality","Text","Value","StartTime","EndTime"]

Option to pick distinct properties from AVEVA Insight

Tag

Optional

{

"Filter": "startswith(Location,'/Lake')",

"Select": ["FQN","Location"]

}

The Tag expression is used to apply a filter on the tags.

The Filter parameter is used to apply a filter on the tags.

The Select parameter is used to specify the property name that could be used in the tag filter. If extended property is used in the filter, then it is must to specify in the select.

StartDateTime

Optional

 "2019-01-01T00:00:00Z" (optional parameter to restrict back fill data)

Any valid UTC date time value, Optional parameter to restrict backfill data.

RetrievalMode

Optional

Cyclic or Full.

Retrieval mode of the query

Resolution

Required

3000

A valid numeric value in milliseconds.

This value is required for Cyclic Retrieval mode.

Sample query expression

{

"QueryName":"TDDProcessValues",

"SelectColumn": ["FQN","OpcQuality","Text","Value", "DateTime AS StartTime","DateTime AS EndTime"],

"DistinctColumn": ["FQN","OpcQuality","Text","Value","StartTime","EndTime"],

"Tag": {

"Filter":"startswith(Location,'/Lake')",

"Select":"FQN,Location"

},

"StartDateTime":" 2019-05-01T00:00:00.0000000Z",

"Resolution":3000,

"RetrievalMode":"Cyclic"

}

Note: If you use the Tag Extended Property (TEP) in the Filter expression, you must use the same in the SelectColumn list. The Tag Extended Property is applicable for only AVEVA Insight queries. For more information about the Tag Extended Property, see the AVEVA Insight Help.

Data Transformation for TDDProcessValues

The TDD Dimension requires StartDateTime and EndDateTime. However, the AVEVA Insight ProcessValues endpoint returns the following data, which does not comprise of the pre-defined StartDateTime and EndDateTime.

FQN

DateTime

Opc
Quality

Value

Text

Weather.Los Angeles.Temperature

2020-01-06T07:25:19.216486Z

192

104

104

Weather.Los Angeles.Temperature

2020-01-06T07:45:00.010240Z

192

105

105

Weather.Los Angeles.Temperature

2020-01-06T08:00:01.087106Z

0

105.2

105.2

Weather.Los Angeles.Humidity

2020-01-06T08:00:01.087106Z

192

70

70

Weather.Los Angeles.Temperature

2020-01-06T08:05:36.228415Z

192

105.5

105.5

Weather.Los Angeles.Temperature

2020-01-06T08:10:11.864521Z

0

105.6

105.6

Weather.Los Angeles.Temperature

2020-01-06T08:25:45.341932Z

192

106

106

Weather.Los Angeles.Humidity

2020-01-06T08:25:45.341932Z

192

72

72

The AVEVA Insight Adapter processes the data returned by the ProcessValues endpoint. The processing is based on the rule that the timestamp of the current record of the same FQN is considered as the previous record's end time (EndDateTime field from the table below), and the previous record's timestamp is considered as the current record's start time (StartDateTime 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.

FQN

StartDateTime

EndDateTime

Opc
Quality

Value

Text

Weather.Los Angeles.Temperature

2020-01-06T07:25:19.216486Z

2020-01-06T07:45:00.010240Z

192

104

104

Weather.Los Angeles.Temperature

2020-01-06T07:45:00.010240Z

2020-01-06T08:05:36.228415Z

192

105

105

Weather.Los Angeles.Temperature

2020-01-06T08:00:01.087106Z

0

105.2

105.2

Weather.Los Angeles.Temperature

2020-01-06T08:05:36.228415Z

2020-01-06T08:25:45.341932Z

192

105.5

105.5

Weather.Los Angeles.Temperature

2020-01-06T08:10:11.864521Z

0

105.6

105.6

Weather.Los Angeles.Temperature

2020-01-06T08:25:45.341932Z

9998-12-31 23:59:59.00

192

106

106

Weather.Los Angeles.Humidity

2020-01-06T08:00:01.087106Z

2020-01-06T08:25:45.341932Z

192

70

70

Weather.Los Angeles.Humidity

2020-01-06T08:25:45.341932Z

9998-12-31 23:59:59.00

192

72

72

Note:
- Only the records with the "OpcQuality" value as "192" are considered for processing.
- AVEVA Insight Azure function considers “9998-12-31 23:59:59.00” as the value for the future EndDateTime. This record reflects the current value/state of the tagname.

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