Type based Filtering
This application demonstrates filter out events based on data type of the attribute
define stream SweetProductionStream (name string, amount int);
@info(name='ProcessSweetProductionStream')
from SweetProductionStream
select
instanceOfInteger(amount) as isAIntInstance,
name,
amount
insert into ProcessedSweetProductionStream;
|
Defines |
|
|
|
|
|
Input
Below event is sent to SweetProductionStream
,
['chocolate cake'
, 'invalid'
]
Output
After processing, the event arriving at ProcessedSweetProductionStream
will be as follows:
[false
, 'chocolate cake'
, 'invalid'
]