Sliding Time Window Aggregator*¶
This stage aggregates the data of a single point by the sliding time window. The settings for this stage are as per the below.
Window type: Sliding window.
Supported aggregators: max/min/avg/count/sum/first/last.
This stage cannot guarantee idempotence of the calculation results due to failure retries caused by any reasons, such as cluster node exceptions.
Incompatible with old data formats, i.e. cannot filter data by
ModelId::PointId
.
Configuration¶
The configuration tabs for this stage are General, Basic, Input/Output, ExtraConfig, and CacheConfig.
General¶
Name |
Required? |
Description |
---|---|---|
Name |
Yes |
The name of the stage. |
Description |
No |
The description of the stage. |
Stage Library |
Yes |
The streaming operator library to which the stage belongs. |
Required Fields |
No |
The fields that the data records must contain. If the specified fields are not included, the record will be filtered out. |
Preconditions |
No |
The conditions that must be satisfied by the data records. Records that do not meet the conditions will be filtered out. For example, |
On Record Error |
Yes |
The processing method for error data.
|
Basic¶
Name |
Required? |
Description |
---|---|---|
Quality Filter |
No |
Filter the data according to the data quality. Only records that meet the quality conditions will be processed by this stage. |
Input/Output¶
Name |
Required? |
Description |
---|---|---|
Input Measurement |
Yes |
Data input point |
Fixed Window Size |
Yes |
Specify the step length of the fixed time window. |
Fixed Window Unit |
Yes |
Select the unit for the fixed time window. |
Sliding Window Size |
Yes |
Specify the step length of the sliding window. |
Sliding Window Unit |
Yes |
Select the unit for the sliding window. |
Aggregator Policy |
Yes |
Select the aggregator for data aggregation: max/min/avg/count/sum/first/last. |
Output Measurement |
Yes |
Data output point |
ExtraConfig¶
Name |
Required? |
Description |
---|---|---|
Output Data Type |
Yes |
Select the output data type. Options are Double and From Catalog Service.
|
CacheConfig¶
Name |
Required? |
Description |
---|---|---|
Cache Type |
Yes |
Select the storage type for cache data. Options are Redis and Local storage.
|
Output Results¶
The output results of this stage are included in the attr
struct. The description of the fields are as follows:
Name |
Data Type |
Description |
---|---|---|
lastOutput |
Integer/Double/Float |
The last output of the point (NaN for no output). |
calMode |
String |
The output mode, which is the final output. |
calType |
String |
The selected aggregator: max/min/avg/count/sum/first/last. |
calDetail |
Map |
The calculation details. For example, when calType=avg, output the sum and count value of value and lastValue. |
Note
The values of modelIdPath, pointId, and modelId in the output of this operator are the default strings: modelIdPath, pointId, and modelId respectively.