/
Bulk export history

Bulk export history

Run this query in Folio:

readAll(point and his).hisRead(2020-01-01..2024-12-31,{-limit}).renameCols(readAll(point and his).hisRead(null).removeCol("ts").cols.reduce({}, (acc, column) => acc.set(column.name,column.meta["navName"].toTagName))

Get the Zinc result and paste it in a spreadsheet, should be something like this:

ver: "3" view: "chart" hisStart: 2024-12-31T23:00:00.000Z hisStartTimezone: "Rome" hisStartOffset: 60 hisEnd: 2025-12-31T23:00:00.000Z hisEndTimezone: "Rome" hisEndOffset: 60 hisLimit: 999999999 dis: "2025" ts,em20EnergyActive,em12EnergyActive,em15EnergyActive,em14EnergyActive,em22EnergyActive,em21EnergyActive,em19EnergyActive,em35EnergyActive,em07EnergyActive 2024-12-31T23:00:00.000Z,0kWh,0kWh,3.75kWh,3kWh,3.25kWh,0.75kWh,0kWh,0kWh,0kWh,30kWh,0.03125kWh,0.125kWh,0.03125kWh,2.5kWh,0kWh,0.0625kWh 2025-01-01T00:00:00.000Z,0kWh,0kWh,34kWh,0kWh,34.25kWh,0kWh,0kWh,0kWh,0.125kWh,33.75kWh,0kWh,0kWh,0kWh,0.25kWh,0kWh,0kWh 2025-01-01T01:00:00.000Z,0.015625kWh,-1kWh,3.25kWh,25.5kWh,3.75kWh,0.5kWh,0.109375kWh,0.109375kWh,0kWh,29.75kWh,0.34375kWh,0.28515625kWh,0.375kWh,27kWh,0.40625kWh,0kWh

Some notes:

  • the time range can be customized in the first hisRead, see Span for accepted values

  • the queried points can be customized, but both the readAll occurrencies have to match

  • column names cannot be duplicated; in that case, use column.meta.dis instead of column.meta["navName"]

  • toTagName is needed to comply with rules for column names

  • as this query calls twice readAll(...).hisRead(...), it can be expensive

Related content

Haystack REST APIs
Haystack REST APIs
Read with this
Fixing History Timezones
Fixing History Timezones
More like this
A Guide to REST APIs
A Guide to REST APIs
Read with this
Historian
Historian
More like this
History Comparison Chart
History Comparison Chart
More like this
Create History Report
Create History Report
More like this