Unnamed Windows

An unnamed window is an implicitly created stateful element that cannot be referenced or used elsewhere in a project.

An unnamed window is implicitly created when the KEEP clause is used with a source name in the FROM clause of a statement. Refer to the KEEP Clause topic for details on the syntax.

Note: On a Delta Stream, only unnamed windows can be created by specifying the KEEP clause from the FROM clause.

Examples

This example creates an unnamed window on the input Trades for the MaxTradePrice window to keep track of a maximum trade price for all symbols seen within the last 10000 trades:

CREATE WINDOW MaxTradePrice 
PRIMARY KEY DEDUCED 
STORE S1 
AS SELECT trd.Symbol, max(trd.Price) MaxPrice 
FROM Trades trd KEEP 10000 ROWS 
GROUP BY trd.Symbol;

This example creates an unnamed window on Trades, and MaxTradePrice keeps track of the maximum trade price for all the symbols during the last 10 minutes of trades:

In both examples, Trades can be a delta stream, or a window.

Related reference
CREATE WINDOW Statement
KEEP Clause