The file transport handler allows the reading and writing to arbitrary files
Options
filename:
The path to the fileappend
: append values to end of file. If set to false (default) the values are overwritten.
Example
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | File Transport Handler |
---|
linenumbers | true |
---|
|
input = ACCESS({source='Source',
wrapper='GenericPull',
transport='File',
protocol='CSV',
dataHandler='Tuple',
options=[['filename', '/src/odysseus/input.csv']],
schema=[
['id', 'Double'],
['data', 'String']]
})
output = SENDER({sink='Sink',
wrapper='GenericPush',
transport='File',
protocol='CSV',
dataHandler='Tuple',
options=[['filename', '/src/odysseus/output.csv']]
}, input) |
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | File Transport Handler |
---|
linenumbers | true |
---|
|
CREATE STREAM source (id Double, data STRING)
WRAPPER 'GenericPush'
PROTOCOL 'CSV'
TRANSPORT 'File'
DATAHANDLER 'Tuple'
OPTIONS ( 'filename' '/src/odysseus/input.csv')
CREATE SINK sink (id Double, data STRING)
WRAPPER 'GenericPush'
PROTOCOL 'CSV'
TRANSPORT 'File'
DATAHANDLER 'Tuple'
OPTIONS ( 'filename' '/src/odysseus/output.csv')
|