I’ve been playing around with the new system.historian.queryAggregatedPoints() function in 8.3.2 and I’m seeing some strange results when using returnFormat="CALCULATION".
It almost seems like it is internally performing a cross-join of some sort with the calculated results to return far too many calculated columns - the number of calculated columns returned is equal to len(paths)*len(aggregates). If I pass in 3 tags and 3 aggregates, I’m getting back a dataset with 9 calculated columns (plus the t_stamp and tagpath columns). The calculated column names and values are repeated every 3 columns.
I would assume this is a bug? Or am I missing a key piece of information for how to use this function with that specific parameter value?
Test Code
tags = [
"tagpath1",
"tagpath2",
"tagpath3",
]
start = system.date.getDate(2026, 1, 25)
end = system.date.addMinutes(start, 5)
aggregates = ["Average", "Minimum", "Maximum"]
ds = system.historian.queryAggregatedPoints(tags, start, end, aggregates, returnFormat="CALCULATION")
print "Column Names:", system.dataset.getColumnHeaders(ds)
for r in ds:
print r[0:2] + [round(c, 1) for c in r[2:]]
Output
Column Names: [u't_stamp', u'tagpath', u'Average', u'Minimum', u'Maximum', u'Average', u'Minimum', u'Maximum', u'Average', u'Minimum', u'Maximum']
[Wed Feb 25 00:00:00 EST 2026, u'prov:Example:/tag:tagpath1', 1348.0, 1333.0, 1363.0, 1348.0, 1333.0, 1363.0, 1348.0, 1333.0, 1363.0]
[Wed Feb 25 00:00:00 EST 2026, u'prov:Example:/tag:tagpath2', 70.0, 70.0, 70.0, 70.0, 70.0, 70.0, 70.0, 70.0, 70.0]
[Wed Feb 25 00:00:00 EST 2026, u'prov:Example:/tag:tagpath3', 54.0, 54.0, 54.0, 54.0, 54.0, 54.0, 54.0, 54.0, 54.0]