Example: SourceStream with autogen Attribute Migration

In CCL, nextval() is equivalent to the Aleri autogen attribute, and the Aleri store element migrates to a CREATE MEMORY STORE statement.

Therefore, this example migrates to an input window followed by an output window, and the id column is included for the output window schema with nextval() set as the value in the SELECT clause.

AleriML:

<Store file="store1" fullsize="64" id="store1" kind="memory"/>
    <SourceStream id="alldatatypes" store="store1" insertOnly="true">
    <Column datatype="int64" key="true" name="id" autogen="true"/>
    <Column datatype="int64" key="false" name="a"/>
    <Column datatype="string" key="false" name="charData"/>
  </SourceStream>

CCL:

CREATE  MEMORY  STORE store1 PROPERTIES  INDEXTYPE ='tree',  INDEXSIZEHINT =8;
CREATE  INPUT  STREAM Ccl_0_alldatatypes
SCHEMA (a LONG, charData STRING);
CREATE  OUTPUT  WINDOW alldatatypes
SCHEMA (id LONG, a LONG, charData STRING)
PRIMARY KEY (id)
 STORE store1
 AS 
 SELECT  nextval() AS id, Ccl_0_alldatatypes.a AS a, Ccl_0_alldatatypes.charData AS charData FROM Ccl_0_alldatatypes;