0

I have two streams, streamA and streamB. Each of streamA has an ID and matching event in streamB will have same ID.

I want to know from streamA which IDs have not come in streamB after a sliding window of lets say, 1 minute.

I have tried this, but did not work out:

from streamA as A join streamB#window.time(1 min) as B on A.id == B.id select S.Id insert expired events into streamC;

Let me know how to solve this.

spiralarchitect
  • 880
  • 7
  • 19

1 Answers1

0

You can use a outer join[1] to fulfill this requirement. Ex:

from streamA as A left outer join streamB#window.time(1 min) as B on A.id == B.id select A.Id, B.Id insert into streamC;

In above query if there are no matching events inside the window, B.Id will be null. So you can write another query to consume streamC to isolate events with null attributes and process them further.

[1]https://docs.wso2.com/display/CEP410/SiddhiQL+Guide+3.0#SiddhiQLGuide3.0-Outerjoins

Tishan
  • 890
  • 6
  • 11