Keyed Segmented Context
create context context_name partition [by]
event_property [and event_property [and ...]] from stream_def
[, event_property [...] from stream_def]
[, ...]create context SegmentedByCustomer partition by custId from BankTxncontext SegmentedByCustomer
select custId, account, sum(amount) from BankTxn group by accountcontext SegmentedByCustomer
select * from pattern [
every a=BankTxn(amount > 400) -> b=BankTxn(amount > 400) where timer:within(10 minutes)
]// Neither LoginEvent nor LogoutEvent are listed in the context declaration
context SegmentedByCustomer
select * from pattern [every a=LoginEvent -> b=LogoutEvent where timer:within(10 minutes)]最后更新于