R UDF

User-defined function operator in R script

Home > User Defined Functions > R

Input Properties

PropertyRequirementTypeDefaultDescription
R UDF ScriptCode (r)See template belowInput your code here
Worker countInteger1Specify how many parallel workers to launch
Use Tuple API?BooleanfalseCheck this box to use Tuple API, leave unchecked
to use Table API
Retain input columnsBooleantrueKeep the original input columns?
Extra output column(s)List-Name of the newly added output columns that the
UDF will produce, if any
↳ Attribute NameString-
↳ Attribute Typestring, integer, long, double, boolean,
timestamp, binary, large_binary
-

Default Code Template

R UDF Script

# If using Table API:
# function(table, port) { 
#   return (table) 
# }

# If using Tuple API:
# library(coro)
# coro::generator(function(tuple, port) {
#   yield (tuple)
# })

Output Ports

PortMode
0Set Snapshot