Esper - detect event after absence

2019-09-10 21:26发布

I found out that it is possible to detect the absence of an event using for example: select * from pattern [every EventX -> (timer:interval(10 sec) and not EventX)], but is it also possible to detect the presence of an event after it was absent? Using prior perhaps? And is it possible to use one statement for detecting both absence and presence? Thanks in advance!

标签: esper
1条回答
forever°为你锁心
2楼-- · 2019-09-10 22:08

Its sounds like you are looking for this

every EventX -> (timer:interval(10 sec) and not EventX) -> Event X

...adding some time interval withing which the event should arrive...

every EventX -> (timer:interval(10 sec) and not EventX) -> Event X where timer:within(10)

Try an outer join to detect with multiple patterns:

select * from pattern[...].win:length_batch(1) as pattern1 full outer join pattern[...].win:length_batch(1) as pattern2
查看更多
登录 后发表回答