Returns the sequence number, or ROWID, of a given row in the window or stream as a 64-bit integer.
getrowid ( row )
| row | A record from a window, stream, or delta stream, which is identified by the window or stream's name. |
Each incoming row of data is assigned a unique sequence number or ROWID. The getrowid function takes a window or stream's identifier as its argument, and returns the ROWID of the row in the window or stream. It can be used with a stream, delta stream, or window. For more information about ROWID, see the Programmers Guide.
CREATE INPUT STREAM MarketIn
SCHEMA ( Symbol STRING, Price MONEY(4), Volume INTEGER );
CREATE OUTPUT STREAM MarketOut
SCHEMA ( RowId LONG, Symbol STRING, Price MONEY(4), Volume INTEGER, TradeValue MONEY(4))
AS
SELECT
getrowid ( MarketIn ) RowId,
MarketIn.Symbol,
MarketIn.Price,
MarketIn.Volume,
MarketIn.Price * MarketIn.Volume as TradeValue
FROM MarketIn;