JOIN
This is used to join two streams on some condition at run time. It selects some attributes from this stream (stream where data is ingested) “iatr” and few from the joining stream “rstm”, it also may compute few attributes using “catr” and then send the combined data to the output stream (third one).
In the process it may also notify as required.
"join":[ { "name":"myjoin1", "type":1, "tloc":30, "iatr":[ "a", "b", "c", "e" ], "rstm":"s2", "ratr":[ "j1", "j2", "j3" ], "jqry":{ "cond":[ "a", "b" ], "opid":11, "opnm":"myrule2", "args":[ "a", "b" ] }, "ostm":"s3" } ]
Let’s look at this example.
It’s trying to join two streams, this (s1) and s2 and sending the output to stream s3. Output is union of set “iatr” and “ratr” (a, b, c, d, j1, j2, j3). The “jqry” is as defined here for more information.
Please note “notf” key, it says once joined send notification using notif id 123. The notification can be sent for filter as well. Please see notificaton for more info.
Note: One important thing to note here is “type”, which is the type. It has meaning and there are more than one types of join in the db which should be used for different use cases, pls see CEP for more information