Use the File CSV Output adapter to send data to an external destination.
The example creates a schema named TradeSchema that is referenced by an input window named InTrades. The example attaches a File CSV Output adapter named csvOut and a File CSV Input adapter named InConn to InTrades.
ATTACH OUTPUT ADAPTER csvOut
TYPE dsv_out
TO InTrades
PROPERTIES prependStreamNameOpcode = FALSE ,
dir = '../exampleoutput' , file = 'csvoutput.csv' ,
outputBase = FALSE , delimiter = ',' , hasHeader = FALSE , filePattern = '*.csv' ,
onlyBase = FALSE , dateFormat = '%Y-%m-%dT%H:%M:%S' ,
timestampFormat = '%Y-%m-%dT%H:%M:%S' ;
ATTACH INPUT ADAPTER InConn
TYPE dsv_in
TO InTrades
PROPERTIES expectStreamNameOpcode = FALSE ,
fieldCount =0 ,
dir = '../exampledata' ,
file = 'stock-trades.csv' ,
repeatCount =0 , repeatField = '-' ,
delimiter = ',' , hasHeader = FALSE ,
filePattern = '*.csv' , pollperiod =0 ,
safeOps = FALSE , skipDels = FALSE , dateFormat = '%Y/%m/%d %H:%M:%S' ,
timestampFormat = '%Y/%m/%d %H:%M:%S' ,
blockSize =1 ;