This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

R

Operators in the R category

Home > User-defined Functions > R

Operators

OperatorDescription
R UDFUser-defined function operator in R script
1-out R UDFUser-defined function operator in R script

Total: 2 operators

1 - 1-out R UDF

User-defined function operator in R script

Home > User Defined Functions > R

Input Properties

PropertyRequirementTypeDefaultDescription
R Source UDF Script✓Code (r)See template belowInput your code here
Worker count✓Integer1Specify how many parallel workers to launch
Use Tuple API?✓BooleanfalseCheck this box to use Tuple API, leave unchecked
to use Table API
ColumnsList-The columns of the source
↳ Attribute Name✓String-
↳ Attribute Type✓string, integer, long, double, boolean,
timestamp, binary, large_binary
-

Default Code Template

R Source UDF Script

# If using Table API:
# function() { 
#   return (data.frame(Column_Here = "Value_Here")) 
# }

# If using Tuple API:
# library(coro)
# coro::generator(function() {
#   yield (list(text= "hello world!"))
# })

Output Ports

PortMode
0Set Snapshot

2 - R UDF

User-defined function operator in R script

Home > User Defined Functions > R

Input Properties

PropertyRequirementTypeDefaultDescription
R UDF Script✓Code (r)See template belowInput your code here
Worker count✓Integer1Specify how many parallel workers to launch
Use Tuple API?✓BooleanfalseCheck this box to use Tuple API, leave unchecked
to use Table API
Retain input columns✓BooleantrueKeep the original input columns?
Extra output column(s)List-Name of the newly added output columns that the
UDF will produce, if any
↳ Attribute Name✓String-
↳ Attribute Type✓string, 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