Skip to main content
Version: 8.3 Beta 🚧

system.historian.queryAggregatedPoints

This function is used in Python Scripting.

Description​

Queries aggregated data points for the specified historian.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.historian.queryAggregatedPoints(paths, startTime, endTime, [aggregates], [fillModes], [columnNames], [returnFormat], [returnSize], [includeBounds], [excludeObservations])

Parameters​

TypeParameterDescription
ListpathsA list of historical paths to query aggregated data points for.
DatestartTimeA start time to query aggregated data points for.
DateendTimeAn end time to query aggregated data points for.
ListaggregatesA list of aggregate functions to apply to the query. [Optional]
ListfillModesA list of fill modes to apply to the query. [Optional]
ListcolumnNamesA list of alias column names for the returned dataset. [Optional]
StringreturnFormatThe desired return format for the query. [Optional]
IntegerreturnSizeThe maximum number of results to return. [Optional]
BooleanincludeBoundsWhether to include the bounds in the query results. [Optional]
BooleanexcludeObservationsWhether to exclude observed aggregated data points in the query results. [Optional]

Returns​

Dataset - A dataset representing the aggregated values for the specified historical paths.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Code Snippet
# Query a specified historical simulator tag path and display aggregated data from within the past minute

end = system.date.now()
start = system.date.addMinutes(end, -1)

myDataset = system.historian.queryAggregatedPoints(["[default]_Simulator_/Random/RandomInteger1"], start, end)

for row in myDataset:
print row[0], row[1]