The run mode

In this mode, you have the full control over the data flow and operates on the lowest possible API level.

nz.mode
Equals run.
nz.fun
Does not accept any default parameters except for args.
nz.args
By default an empty list.
nz.shaper
Required if UDX output defined as TABLE(ANY).
nz.shaper.args
Optional.
nz.shaper.list
Required if nz.shaper is set to std.
The following function can be registered as a UDF or a UDTF. It calculates the square root of the first input column and returns the result as the only output column.
nz.mode <- 'run'
nz.fun <- function() {
while(getNext()) {
x <- getInputColumn(0)
setOutput(0, sqrt(as.double(x)))
outputResult()
}
}