Use the AGING clause to set an age column for an output window.
The example creates a memory store named memory1, followed by an input window named TradesWindow that uses the memory1 store. The example attaches the File CSV Adapter to TradesWindow.
CREATE MEMORY STORE memory1 PROPERTIES INDEXTYPE ='tree', INDEXSIZEHINT =8; CREATE INPUT WINDOW TradesWindow SCHEMA ( Ts bigdatetime , Symbol STRING, Price MONEY(2), Volume INTEGER) PRIMARY KEY (Ts) STORE memory1;
The example creates an output window named AgingWindow. The age column for the output window increments every 10 seconds until the age column is equal to 20.
CREATE OUTPUT WINDOW AgingWindow SCHEMA ( AgeColumn integer, Symbol STRING, Ts bigdatetime ) PRIMARY KEY (Symbol) AGES EVERY 10 SECONDS SET AgeColumn 20 TIMES AS SELECT 1 as AgeColumn, TradesWindow.Symbol AS Symbol, TradesWindow.Ts AS Ts FROM TradesWindow ;