<< Click to Display Table of Contents >>
EpmQueryDatasetRecent |
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 Recent Period-type of period defined in the @period and @timeUnit parameters.
SELECT Name, Timestamp, Quality, <type_function>(Value)
FROM EpmQueryDatasetRecent(<[string]@datasetName>,
<[int]@period>, <[string]@timeUnit>)
•<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
•<[int]@period>: Number of time units informed in the @timeUnit parameter for this query
•<[string]@timeUnit>: Time unit. Possible values are Second, Minute, Hour, Day, or Month
•Name: Name of a variable or variables retrieved
•Timestamp: Timestamp of data retrieved
•Quality: Quality of data retrieved
•Value: Value of data retrieved
To return a table based on the configurations of pens and types of aggregation of the ODBC_Dataset on a period of 3 (three) minutes before the moment that query was performed, 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
EpmQueryDatasetRecent('ODBC_Dataset', 3, 'Minute')
EpmQueryDatasetRecent function