I have some predefined string which number around 100. I have an input stream where i am receiving events and want to check whether the message in the event contain any of the predefined strings as their substring. I am using SiddhiQL. What is the best approach to handle this case?
Asked
Active
Viewed 59 times
1 Answers
0
Since you have around a hundred, it is better to store it in a database and load it to an in-memory table at startup using triggers
OR
You can use siddhi-execution-list to create list object using queries. However, in this case the strings will be added in the siddhi app, so, any changes needs a siddhi app change.

Niveathika
- 1,319
- 2
- 8
- 17
-
Got it. But once loaded into an in-memory table, how can i check whether incoming events contain strings present in table as their substring? – Vishal Gaikwad Dec 20 '19 at 11:25
-
You have to join the table, with 'on condition' as str:contains() https://siddhi-io.github.io/siddhi-execution-string/api/5.0.9/#contains-function – Niveathika Dec 20 '19 at 11:55