This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, go to https://wso2.com/documentation/.
Extrema Extension
bottomKLengthBatch
Syntax | extrema:bottomKLengthBatch(Attribute, windowLength, Kvalue) |
---|---|
Extension Type | StreamProcessor |
Description | bottomKLengthBatch counts the frequency of different values of a specified attribute inside a batch window, and emits the lowest (k) number of frequency values. |
Parameters |
|
Return | The bottom K frequency values are emitted per batch. |
Example |
insert all events into outputStream;) |
topKLength Batch
Syntax | extrema:topKLengthBatch(Attribute, windowLength, Kvalue) |
---|---|
Extension Type | StreamProcessor |
Description | topKLengthBatch counts the frequency of different values of a specified attribute inside a batch window, and emits the highest (k) number of frequency values. |
Parameters |
|
Return | The top K frequency values are emitted per batch. |
Example |
insert all events into outputStream;) |
bottomK
Syntax | extrema:bottomK(Attribute,Kvalue) |
---|---|
Extension Type | StreamProcessor |
bottomK counts the frequency of different values of a specified attribute, and emits the lowest (k) number of frequency values. | |
Parameters |
|
Return | The bottom K frequency values are emitted. Events are emitted only if there is a change in the bottomK results for each received chunk of events. |
Example |
insert all events into outputStream;) |
topK
Syntax | extrema:topK(Attribute,Kvalue) |
---|---|
Extension Type | StreamProcessor |
Description | topK counts the frequency of different values of a specified attribute, and emits the highest (k) number of frequency values. |
Parameters |
|
Return | The top K frequency values are emitted. Events are emitted only if there is a change in the topK results for each received chunk of events. |
Example |
insert all events into outputStream;) |
bottomKTimeBatch
Syntax | extrema:bottomKTimeBatch(Attribute,timeWindow,Kvalue) |
---|---|
Extension Type | StreamProcessor |
Description | bottomKTimeBatch counts the frequency of different values of a specified attribute inside a time window, and emits the lowest (k) number of frequency values. |
Parameters |
|
Return | The bottom K frequency values are emitted. Events are emitted only if there is a change in the bottomK results for each received chunk of events. |
Example |
insert all events into outputStream;) |
topKTimeBatch
Syntax | extrema:topKTimeBatch(Attribute,timeWindow,Kvalue) |
---|---|
Extension Type | StreamProcessor |
Description | topKTimeBatch counts the frequency of different values of a specified attribute inside a time window, and emits the highest (k) number of frequency values. |
Parameters |
|
Return | The top K frequency values are emitted. Events are not emitted if there are no changes in the topK results after the last chunk of events received. |
Example |
insert all events into outputStream; |
maxByLengthBatch
Syntax | window.extrema:maxByLengthBatch(Attribute, BatchLength) |
---|---|
Extension Type | StreamProcessor |
Description | maxByLengthBatch calculates the maximum value of a specified attribute inside a batch window and emits it. |
Parameters |
|
Return | The event with the maximum value for the given attribute in the specified batch window is returned. |
Example |
insert into outputStream ; |
minByLengthBatch
Syntax | window.extrema:minByLengthBatch(Attribute, BatchLength) |
---|---|
Extension Type | StreamProcessor |
Description | minByLengthBatch calculates the minimum value of a specified attribute within a batch window and emits it. |
Parameters |
|
Return | The event with the minimum value for the given attribute in the specified batch window is returned. |
Example |
insert into outputStream ; |
maxByLength
Syntax | window.extrema:minByLength(Attribute, SlidingWindowLength) |
---|---|
Extension Type | StreamProcessor |
Description | minByLength calculates the maximum value of a specified attribute, and emits it. |
Parameters |
|
Return | The event with the maximum value for the given attribute in the specified sliding window is returned. |
Example |
insert into outputStream ; |
minByLength
Syntax | window.extrema:minByLength(Attribute, SlidingWindowLength) |
---|---|
Extension Type | StreamProcessor |
Description | minByLength calculates the minimum value of a specified attribute and emits it. |
Parameters |
|
Return | The event with the minimum value for the given attribute in the specified sliding window is returned. |
Example |
insert into outputStream ; |
maxByTimeBatch
Syntax | window.extrema:maxByTimeBatch(Attribute, TimeBatchLength) |
---|---|
Extension Type | StreamProcessor |
Description | maxByTimeBatch calculates the maximum value of a specified attribute within a time window, and emits it. |
Parameters |
|
Return | The event with the maximum value for the given attribute within the specified time window is returned. |
Example |
insert into outputStream ; |
minByTimeBatch
Syntax | window.extrema:minByTimeBatch(Attribute, TimeBatchLength) |
---|---|
Extension Type | StreamProcessor |
Description | minByTimeBatch calculates the minimum value of a specified attribute within a time window and emits it. |
Parameters |
|
Return | The event with the minimum value for the given attribute within the specified time window is returned. |
Example |
insert into outputStream ; |
maxByTime
Syntax | window.extrema:maxByTime(Attribute, TimeWindowLength) |
---|---|
Extension Type | StreamProcessor |
Description | maxByTime calculates the maximum value of a specified attribute within a sliding time window and emits it. |
Parameters |
|
Return | The event with the maximum value for the given Attribute is returned. This output is updated for every event arrival and expiry during the TimeWindowLength specified. |
Example |
insert into outputStream ; |
minByTime
Syntax | window.extrema:minByTime(Attribute, TimeWindowLength) |
---|---|
Extension Type | StreamProcessor |
Description | minByTime calculates the minimum value of a specified attribute within a sliding time window and emits it. |
Parameters |
|
Return | The event with the minimum value for the given Attribute is returned. This output is updated for every event arrival and expiry during the TimeWindowLength specified. |
Example |
insert into outputStream ; |
kalmanMinMax
Syntax |
|
---|---|
Extension Type | StreamProcessor |
Description | kalmanMinMax uses the kalman filter to smooth the time series values in the given window size, and then determine the maxima and/or minima of that set of values. |
Parameters |
|
Return | Returns the events with the minimum and/or maximum for the specified attribute within the given window length, with the extrema type as min or max as relevant. |
Example | inputStream#:kalmanMinMax(price, 0.000001,0.0001, 25, 'min' ) returns the minimum values for a set of price values. |
kernalMinMax
Syntax |
|
---|---|
Extension Type | StreamProcessor |
Description | kernalMinMax uses Gaussian Kernel to smooth the time series values in the given window size, and then determine the maxima and minima of that set of values. |
Parameters |
|
Return | Returns the events with the minimum and/or maximum for the specified attribute within the given window length, with the extrema type as min or max as relevant. |
Example | The following returns the maximum values for a set of
select * insert into outputStream; |
minMax
Syntax | extrema:minMax(Attribute, MaxPreBound, MaxPostBound, PreBoundChange, PostBoundChange, ExtremaType) |
---|---|
Extension Type | StreamProcessor |
Description | minMax finds the minimum and/or the maximum value within a given length window ( For minimum:
For maximum:
|
Parameters |
|
Return | Returns the events with the minimum and/or maximum for the specified attribute within the given window length, with the extrema type as
|
Example |
|