Example: CopyStream with InputWindow Migration

In this example, the Aleri CopyStream element has an attached stateful (memory) 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 a KEEP clause.

Therefore, this migrates to a local window with a KEEP clause followed by an output window:

AleriML:

<Store file="store1" fullsize="64" id="store1" kind="memory"/>
	<CopyStream id="copydatatypes" store="store1" istream="alldatatypes">
	<InputWindow stream="alldatatypes" type="records" value="1000" slack="500"/>
	</CopyStream>

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 copydatatypes
SCHEMA (id INTEGER, a LONG, charData STRING)
PRIMARY KEY (id, a)
 STORE store1
 AS 
SELECT * FROM Ccl_1_alldatatypes;