If the rules can be implemented by examining events in isolation (e.g., temperature > 25), then the DataStream API is all you need. But if you want rules that are looking for temporal patterns that play across multiple events, then CEP or MATCH_RECOGNIZE (part of Flink SQL) will simplify the implementation. An example of a more complex rule would be something like "the temperature rose by more than 5 degrees during an hour".
Note that both CEP and MATCH_RECOGZNIZE are designed for situations in which the rules are known at compile time. Best, David On Fri, Jul 17, 2020 at 2:05 AM Aissa Elaffani <aissaelaff...@gmail.com> wrote: > Hello Guys, > I have some sensors generating some data about their (température, > humidity, positioning , ...) and I want to apply some rules (simple > conditions, if température>25, ...), in order to define if the sensor is on > "Normal" status or "Alerte" status. Do i need to use flink CEP, or just the > DataStream Api is suffisant to define the status of each sensor. > Sorry for disturbing you ! I hope someone can help me with that. > Thank you guys. > Best > Aissa >