EpmQueryDatasetTimeInterval

<< Click to Display Table of Contents >>

 

EpmQueryDatasetTimeInterval

Returns data from a query containing the configuration of pens and types of aggregation of the Dataset Server informed in the @datasetName parameter and with a Time Interval-type of period informed in the @startTime and @endTime parameters.

 

Syntax

SELECT Name, Timestamp, Quality, <type_function>(Value)
  FROM EpmQueryDatasetTimeInterval(<[string]@datasetName>,
  <[datetime]@startTime>, <[datetime]@endTime>)

 

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

<[string]@datasetName>: Full name of a Dataset Server to search for, which must be between single quotes

<[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

 

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 a table with the configurations of pens and types of aggregation of the ODBC_Dataset Dataset in the period between 10:23 and 10:25 of 12/17/2020, use the next statement. The type of RandomTags_Random1 pen is Raw and the type of RandomTags_Random10 pen is Interpolative with a 30-second interval.

SELECT Name, Timestamp, Quality, doubleval(Value) FROM
  EpmQueryDatasetTimeInterval('ODBC_Dataset', '2020-12-17 10:23:00', '2020-12-17 10:25:00')

 

EpmQueryDatasetTimeInterval function

EpmQueryDatasetTimeInterval function

Was this page useful?