Place a KEEP LAST clause on an input window.
The example creates a schema named TradeSchema that is referenced by an input window named TradeWindow.
The example then creates an output window named KeepLastWindow that outputs data from TradeWindow. KeepLastWindow has a KEEP clause that keeps only the last TradeWindow row processed by KeepLastWindow.
CREATE OUTPUT WINDOW KeepLastWindow Schema ( Symbol string, RowCount INTEGER) PRIMARY KEY DEDUCED KEEP LAST AS SELECT TradeWindow.Symbol as Symbol, count(TradeWindow.Symbol) as RowCount FROM TradeWindow group by TradeWindow.Symbol ;
The example concludes by attaching a File CSV Input adapter named csvInConn1 to TradeWindow.