In CCL, the Aleri PatternStream "compute" migrates to output stream "Ccl_1_Pattern".
This output stream uses the MATCHING and ON clauses to define the pattern from AleriML. The Flex element "Ccl_2_compute" then takes input from the output stream "Ccl_1_Pattern" and outputs it to output window "compute" . The SPLASH code for pattern matching migrates to the ON clause for the Flex element "Ccl_2_compute".
AleriML:
<PatternStream id="compute" istream="alldatatypes" store="store1"> <Column datatype="int32" key="true" name="id"/> <Column datatype="string" key="true" name="charData1"/> <Column datatype="string" key="false" name="charData2"/> <Local> int32 idloc := 0; </Local> <Pattern> within 1 seconds from alldatatypes[charData='aaa'; a=p] as d1, alldatatypes[charData='bbb'; a=q] as d2 on d1 fby d2 { idloc := idloc + 1; output [id = idloc; | Symbol1='aaa'; Symbol2='bbb']; } </Pattern> </PatternStream>
CCL:
CREATE OUTPUT STREAM Ccl_1_Pattern SCHEMA (d1id INTEGER, d1a LONG, d1charData STRING, d2id INTEGER, d2a LONG, d2charData STRING) AS SELECT d1.id AS d1id, d1.a AS d1a, d1.charData AS d1charData, d2.id AS d2id, d2.a AS d2a, d2.charData AS d2charData FROM alldatatypes d1, alldatatypes d2 MATCHING [ 1 SECONDS : ( d1 , d2 ) ] ON d1.charData = 'aaa' AND d2.charData = 'bbb'; CREATE FLEX Ccl_2_compute IN Ccl_1_Pattern, alldatatypes OUT OUTPUT WINDOW compute SCHEMA (id INTEGER, charData1 STRING, charData2 STRING) PRIMARY KEY (id, charData1) STORE store1 BEGIN DECLARE INTEGER idloc := 0; END; ON Ccl_1_Pattern { { idloc := idloc + 1; output [id = idloc; | Symbol1='aaa'; Symbol2='bbb']; } }; ON alldatatypes { }; END;