Create a simple union between two windows.
The example creates two schemas named StocksSchema and OptionsSchema which define the structure for two input windows named InStocks and InOptions, respectively.
The example then creates an output window named Union1 that creates a union between the InStocks and InOptions input windows.
CREATE output Window Union1 SCHEMA OptionsSchema PRIMARY KEY DEDUCED AS SELECT s.Ts as Ts, s.Symbol as StockSymbol, Null as OptionSymbol, s.Price as Price, s.Volume as Volume FROM InStocks s UNION SELECT s.Ts as Ts, s.StockSymbol as StockSymbol, s.OptionSymbol as OptionSymbol, s.Price as Price, s.Volume as Volume FROM InOptions s ;
The example concludes by creating two ATTACH ADAPTER instances named csvInConn1 and csvInConn2. A File CSV Input adapter is attached to the InStocks window in one instance, and the InOptions window in another instance.