Hi,
in a query i have thousands of events devided in four partitions.
My use-case is to send an event if the average of one value of all Events (last 10000) exeeds some level. So i have not really a pattern to detect. As i created the query with Apama Query Designer, i had to define a pattern.
Whats the best way to cover this use-case? Bold marked code is a pseudo pattern. I don’t need this.
inputs {
EventX() key block retain 10000 with unique uuid;
}
find every wait(20.0):w1 -> (EventX:f1 and EventX:f2)
[b]where f1.uLevel>100 and f2.uLevel>100[/b]
select avg(f1.uLevel.toFloat()):e1 {
log("something...");
%send("eventType":".com.nterra.kairos.EventY",
"title":"sendEventY", "description":"",
"channel":"\"\"",
"fields": {
"block":"\"f1.block\"",
"avgSatisfaction":"\"e1\""
});
}
Thanks!
Alex Enns