EpmQueryDatasetRecent

<< Click to Display Table of Contents >>

 

EpmQueryDatasetRecent

Returns data from a query with the configuration of pens and aggregation types from the Dataset Server informed in the @datasetName parameter and a Recent Period-type period defined by the @period and @timeUnit parameters.

 

Syntax

SELECT Name, Timestamp, Quality, Value FROM EpmQueryDatasetRecent(@datasetName, @period, @timeUnit)

 

Parameters

@datasetName: Full name of the Dataset Server to query, which must be between single quotes

@period: Number of time units informed in the @timeUnit parameter in which the query is performed

@timeUnit: Time unit. Possible values are Second, Minute, Hour, Day, or Month

 

Resulting Fields

Name: Name of the variable or variables queried

Timestamp: Timestamp of data found

Quality: Quality of data found

Value: Value of data found

 

Usage Example

To return a table based on the configuration of pens and aggregation types from Dataset ODBC_Dataset in a period of the 3 (three) minutes before the time the query was performed, use the next declaration. The RandomTags_Random1 pen's type is Raw and the RandomTags_Random10 pen's type is Interpolative with a 30-second interval.

SELECT Name, Timestamp, Quality, Value FROM EpmQueryDatasetRecent('ODBC_Dataset', 3, 'Minute')

Was this page useful?