IoT Time Series Aggregates Service¶
The IoT Time Series (TS) Aggregates Service creates aggregated summaries of numeric time series data and provides interfaces to read them. This allows applications to retrieve smaller data sets that cover a long time range with much better performance than processing all the raw time series data.
For example, an aspect could create new data every second, which adds up to ~2.5 million records per month. An application could use the IoT TS Aggregates Service to a summary for each day of the month, obtaining only 30 records.
For accessing this service you need to have the respective roles listed in IoT Time Series Aggregates Service roles and scopes.
A user can only read data within their tenant and subtenants.
The data summarized in an aggregate is the data with timestamps greater than the start time and less than or equal to the end time of the interval. This ensures that count type data is correctly reflected in the aggregate. For example, if a device provides data at the end of every five minutes, the hourly aggregation includes the data with timestamps from five minutes after the hour until the end of the hour (e.g., 3:05 to 4:00).
Each aggregate summarizes the following information:
- value and time of the first data point of the interval
- value and time of the last data point of the interval
- value and time of the minimum data point during the interval
- value and time of the maximum data point during the interval
- the sum of the values during the interval
- the average of the values during the interval
- the count of the good, uncertain, and bad values during the interval
- standard deviation of the values within the interval
The IoT TS Aggregates Service automatically creates pre-calculated aggregates and stores them for later retrieval to enhance performance of aggregate queries. Aggregates of the following interval lengths are pre-calculated:
|2 minutes||Aggregates end at 2 minutes after the hour, 4 minutes after the hour, and so on. They are created within two minutes after the two-minute interval has ended.|
|1 hour||Aggregates end at the top of the hour. They are created within eight minutes after the end of the hour.|
|1 day||Aggregates end at midnight in the asset's time zone. They are created within fifteen minutes after midnight in UTC time.|
The aggregated data is wall clock aligned based on the asset's time zone.
Aggregated data is not immediately available. E.g., if aggregated data of a performance asset is requested at 10:00 with interval length of 1 hour, the response will not contain the aggregate from 9:00 to 10:00, since it has not been calculated yet.
On Demand Aggregates¶
On demand aggregates are available on top of Pre-Calculated aggregates. They are created when a client requests aggregated data, which cannot be calculated using pre-calculated aggregates (e.g. interval length of 4 minute or starting at 10:00). The IoT TS Aggregates Service uses suitable pre-calculated aggregates and generates aggregates on demand.
The following interval lengths are supported:
- 2-60 minutes (In multiple of 2)
- 1-24 hours
- 1+ days
- 1+ weeks
- 1+ months
On performance assets, aggregated data is only created if time series data exists for that time range. Aggregates are created based on the data that is available at the time. Data that arrives late is not included in the initial aggregated results, but triggers a recalculation after a delay.
Quality Code Data¶
If a variable is configured to contain quality code data, the service uses it to rate the aggregates. The quality code is compared to the good and uncertain thresholds defined in the tenant (by default the values are set according to the OPC UA standard).
Good data is defined as anything less than or equal to the
Uncertain data is defined as anything greater than the
goodThreshold value and less than or equal to the
Bad data is defined as anything greater than the
Only good and uncertain data is used to calculate the summary values listed above. Bad data is ignored for these calculations. Each aggregate contains counts of the three types of data:
countbad. If no quality code data is available for a time series record, it is considered good.
The IoT TS Aggregates Service exposes its API for realizing the following tasks:
- Read aggregated interval data using pre-calculated aggregates
- Only pre-calculated interval length are supported in aggregate query.
- Querying aggregates for Simulation asset is not supported.
- Maximum date range for querying 'minute' aggregate is 24 hours.
- Maximum date range for querying 'hour' aggregate is 7 days.
- Maximum date range for querying 'day/week/month' aggregate is 90 days.
- Api request rate limit per Minute for Small, Medium and Large tenants is 60, 120 and 240 respectively. For applications requiring greater request per second, please reach out to us with your feedback via support channel.
- Time zones that are 15 or 45 minutes off a UTC hour (e.g. Nepal standard time (UTC+05:45)) are not supported. Time zones that are an integer number of hours off GMT or 30 minutes off a UTC hour (e.g. India (UTC+05:30)), are supported.
To get the current list of restrictions go to release notes and choose the latest date. From there, go to "MindAccess Developer Plan Subscribers and MindAccess Operator Plan Subscribers" and pick the IoT TS Aggregates Service.
A wind turbine produces time series data for the speed of the blades. The data is sent continuously to MindSphere.
The IoT TS Aggregates Service API allows you to collect aggregated data for the speed of the windmill.
Any questions left?
Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.