I have a set of select statements, each statement serving as a rule with just one property filter in where clause. I want to do a logical AND on all those statements which are loaded at runtime. It’s like a set of rules applied on a stream of event A, output of one statement going into another an so on.
The order of execution of these statements should be determined by the statement priority.
Is this possible using esper? If yes, what is the ideal way to achieve this?
There is a bunch of ways to do this. With insert-into you can pipe the output of one statement into another.
For example...
If you want to change the individual stages of filtering at runtime you could use "create schema HighPriceOrder as Order" so the type of events is known for a given stream name. So for example, let's assume you want to change "Order(price > 100)" to "Order(price > 200)" you could un-deploy the first insert-into EPL and deploy a new insert-into EPL. However since the second EPL depends on the stream HighPriceOrder that the first EPL defined, a "create schema HighPriceOrder as Order" could be used to define name and type of the stream upfront.