...
The query used in this sample is as follows. It checks whether there is a withdrawal of more than 10000, in a day where the rest of the withdrawal amounts are less than 100.
Code Block |
---|
from every a1 = atmStatsStream[amountWithdrawed < 100] -> b1 = atmStatsStream[amountWithdrawed > 10000 and a1.cardNo == b1.cardNo] within 1 day select a1.cardNo as cardNo, a1.cardHolderName as cardHolderName, b1.amountWithdrawed as amountWithdrawed, b1.location as location, b1.cardHolderMobile as cardHolderMobile insert into possibleFraudStreamarrivals_stream#window.time(2 minutes) select * insert expired events into overdue_deliveries_stream; from every arrivalEvent = arrivals_stream -> deliveryEvent = deliveries_stream[arrivalEvent.trackingId == trackingId] or overdue_delivery = overdue_deliveries_stream[arrivalEvent.trackingId == trackingId] select arrivalEvent.trackingId as trackingId, arrivalEvent.customerName as customerName, arrivalEvent.telephoneNo as telephoneNo, deliveryEvent.trackingId as deliveryId insert into filter_stream; from filter_stream [ isNull(deliveryId)] select trackingId, customerName, telephoneNo insert into alert_stream; |
Prerequisites
- See Prerequisites in CEP Samples Setup page for generic prerequisites. (copy apache axiom.jar to
<CEP_HOME>/samples/lib
directory to send XML event types)
...