In this example, the AleriML FilterStream has an attached stateful store and an InputWindow for the input stream "alldatatypes". In CCL, the Aleri store element migrates to a CREATE MEMORY STORE statement and the InputWindow element maps to the KEEP clause.
Therefore, this example migrates to a local window with a KEEP clause, followed by an output window with a WHERE clause.
AleriML:
<Store file="store1" fullsize="64" id="store1" kind="memory"/>
<FilterStream id="filterdatatypes" store="store1" istream="alldatatypes">
<InputWindow stream="alldatatypes" type="records" value="1000" slack="500"/>
<FilterExpression>alldatatypes.charData in ('aa','bb','cc')</FilterExpression>
</FilterStream>
CCL:
CREATE MEMORY STORE store1 PROPERTIES INDEXTYPE ='tree', INDEXSIZEHINT =8;
CREATE LOCAL WINDOW Ccl_1_alldatatypes SCHEMA (id INTEGER, a LONG, charData STRING)
PRIMARY KEY (id, a)
STORE store1
KEEP 1000 ROWS SLACK 500
AS
SELECT alldatatypes.id AS id, alldatatypes.a AS a, alldatatypes.charData AS charData FROM alldatatypes;
CREATE OUTPUT WINDOW filterdatatypes
SCHEMA (id INTEGER, a LONG, charData STRING)
PRIMARY KEY (id, a)
STORE store1
AS
SELECT * FROM Ccl_1_alldatatypes
WHERE Ccl_1_alldatatypes.charData in ('aa','bb','cc');