...
Code Block |
---|
from arrivals_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 is null)] select trackingId, customerName, telephoneNo insert into alert_stream; |
...
To detect whether the delivery event is null, we use the third query isNullquery (deliveryId is null) where the deliveryId will be null if the delivery event is null.
...