A delta stream incorporates the getrowid and now functions.
The example creates an input window named TradesWindow, to which it attaches the File CSV Input adapter.
The example then creates a delta stream named DeltaTrades and uses the SELECT clause to apply the getrowid and now functions to TradesWindow.
The getrowid function retrieves the sequence number of the rows for share symbol, timestamp, price, and value in the input window. The now function publishes the process date in bidgatetime format.
CREATE LOCAL DELTA STREAM DeltaTrades SCHEMA ( RowId long, Symbol STRING, Ts bigdatetime, Price MONEY(2), Volume INTEGER, ProcessDate bigdatetime ) PRIMARY KEY (Ts) AS SELECT getrowid ( TradesWindow) RowId, TradesWindow.Symbol, TradesWindow.Ts Ts, TradesWindow.Price, TradesWindow.Volume, now() ProcessDate FROM TradesWindow
The example creates an output window named TradesOut for viewing the results.