Create input and local streams.
The example creates an input stream named TradeStream and a local stream named TradeLocalStream. The local stream uses SELECT all (*) syntax to retrieve all data columns from TradeStream.
CREATE LOCAL STREAM TradeLocalStream SCHEMA (Ts BIGDATETIME, Symbol STRING, Price MONEY(2), Volume INTEGER) AS SELECT * from TradeStream;
The example attaches the File CSV Input adapter to TradeStream, then creates an output stream named TradeOutStream.
CREATE OUTPUT STREAM TradeOutStream AS SELECT * FROM TradeLocalStream ;
TradeOutStream retrieves all the data columns from TradeLocalStream using SELECT all syntax, and outputs them using the File CSV Output adapter.
ATTACH OUTPUT ADAPTER Adapter1 TYPE dsv_out TO TradeOutStream PROPERTIES dir = '$ProjectFolder/../output' , file = 'streams.csv' , outputBase = TRUE , hasHeader = TRUE , runtimeDir = 'c:/esp/output' ;