We have a Stream UDF that runs an aggregation on a set and we’d like to write the result to a different set. This would all occur server side, preferably.
Can a Record UDF process the result of a Stream UDF? Or is there another server-side means of writing data from the Stream UDF?
Thanks in advance!
Stream UDF are read only in nature. And also given the distributed nature of the aggregation, final reduce would happen on the client side only. So there is no way to write result of the stream back to the server in a single call.
Scope of the Record UDF is single record. That means you can read and write only 1 record, there is no way to write data on the some other set (i.e some other record). This is for reason that the NEW record being written could be actually reside on different physical node, that would mean a need to do network hop from inside lua function.
If you can elaborate on your use case. We can help you find a best alternative way to achieve it.