EpmQueryRawFunction

<< Click to Display Table of Contents >>

 

EpmQueryRawFunction

Returns all data from one or more variables, informed in the @node parameter, registered in the informed period.

 

Syntax

SELECT Name, Timestamp, Quality, <type_function>(Value)
  FROM EpmQueryRawFunction(<[float]@timeZoneOffset>, <[datetime]@startTime>,
  <[datetime]@endTime>, <[int]@valuesPerNode>, <[bit]@returnBounds>, <[string]@node>)

 

Parameters

<type_function>: Conversion function to define a data type for the resulting values on the Value column. Possible values are described on topic EpmReadPropertyFunction

<[float]@timeZoneOffset>: Timezone to consider. Possible values range from -12 to 14

<[datetime]@startTime>: Initial date of the period to retrieve. This must be a String in the format yyyy-MM-dd HH:mm:ss

<[datetime]@endTime>: Final date of the period to retrieve. This must be a String in the format yyyy-MM-dd HH:mm:ss

<[int]@valuesPerNode>: Informs the maximum number of values to retrieve for each variable retrieved. A value of 0 (zero) indicates that there are no limits

<[bit]@returnBounds>: Defines whether to retrieve the value previous to the first value found in the informed period and the value after the last value informed. Possible values are 1 (one) or 0 (zero)

<[string]@node>: Variable or variables to retrieve. Users must inform a full name or names between single quotes and separated by commas

 

Result Fields

Name: Name of a variable or variables retrieved

Timestamp: Timestamp of data retrieved

Quality: Quality of data retrieved

Value: Value of data retrieved

 

Example

To return raw data, that is, all data effectively stored in the RandomTags_Random1 variable on the period between 10:23 and 11:23 of 12/07/2020, with a timezone of -3 (minus three) hours, also returning the value immediately before the beginning of the queried period, use the next statement.

SELECT Name, Timestamp, Quality, doubleVal(Value) FROM
  EpmQueryRawFunction(-3, '2020-12-07 10:23:00', '2020-12-07 11:23:00',
  0, 1, 'RandomTags_Random1')

 

EpmQueryRawFunction function

EpmQueryRawFunction function

Was this page useful?