Filesystem file
The Filesystem file channel is very similar to the Workspace channel. The difference is
that in this case the environment variable is named ABSOLUTE_PATH and contains the
full file path instead of just the file name.
x <- list(mode='run', args=list(), fun=function(){
getNext(); setOutput(0,'output value'); outputResult()})
output <- file('/home/nz/raedata','w')
serialize(x, output, ascii=TRUE)
close(output)
Invoking this
query:
SELECT * FROM TABLE WITH FINAL(nzr..r_udtf('ABSOLUTE_PATH=/home/nz/raedata'));
results in:COLUMNID | VALUE
----------+--------------
0 | output value
(1 row)