My incoming event contains userId property. I'd like to be able to read the parameter value according to userId from the CQEngine. Should I implement this as extension of FunctionExecutor and use it like:
define stream cseEventStream (userId string, symbol string, price long, volume long);
@info(name = 'query1')
from cseEventStream [price < custom:cache(userId)]
select *
insert into Output
or is there some better way how to do it. The problem is that before first use of CQEngine I need to initialize it with data. Probably "start" method of the FunctionExecutor could be used for this purpose?