This invokes a user-defined function in TileDB Cloud.
Usage
execute_array_udf(
array,
udf = NULL,
registered_udf_name = NULL,
selectedRanges,
attrs = NULL,
layout = NULL,
args = NULL,
result_format = "native",
args_format = "native",
namespace = NULL,
language = "r",
resource_class = NULL
)
Arguments
- array
Name of the array, in the form either
tiledb://hello/world
orhello/world
.- udf
An R function which takes a dataframe as argument. Arguments are specified separately via
args
. One ofudf
andregistered_udf_name
must be non-null.- registered_udf_name
Name of a registered UDF, of the form
namespace/udfname
. Arguments are specified separately viaargs
. One ofudf
andregistered_udf_name
must be non-null.- selectedRanges
List of two-column matrices, one matrix per dimension, each matrix being a start-end pair: e.g.
list(cbind(1,10),cbind(1,20))
.- attrs
Optional list of attributes (default: all) for the server-side code to select for UDF execution. Specifying only what your UDF needs is useful for memory-usage control.
- layout
One of
row-major
,col-major
,global-order
, orunordered
,- args
Arguments to the function. If the function takes no arguments, this can be omitted. If you want to call by position, use a list like
args=list(123, 456)
. If you want to call by name, use a named list likeargs=list(x=123,y=456)
.- result_format
One of
native
,json
, orarrow
. These are used as wire format for returning results from the server to this library, primarily for memory-usage control. UDF return values handed back to your code from this library are converted back to natural R objects.- args_format
One of
native
,json
, orarrow
. These are used as wire format for sending arguments to the server. Normally you do not need to specify this. If you're invoking an R UDF,native
is used; if you're invoking a registered Python UDF,json
is used but you can selectarrow
if you wish.- namespace
Namespace within TileDB cloud to charge. If this is null, the logged-in user's username will be used for the namespace.
- language
If omitted, defaults to
"r"
. Can be set to"python"
when executing registered Python UDFs.- resource_class
The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is `NULL`, then the UDF will execute in the standard resource class of the TileDB Cloud provider. This can be set to
"large"
.
Details
Nominally you will first call login
; if not, the results
of the last login at ~/.tiledb/cloud.json
will be used.
All arguments are required.
See also
Other manual-layer functions:
array_info()
,
compute_sequentially()
,
compute()
,
delayed_args<-()
,
delayed_args()
,
delayed_array_udf()
,
delayed_generic_udf()
,
delayed_sql()
,
delayed()
,
deregister_array()
,
deregister_group()
,
deregister_udf()
,
execute_generic_udf()
,
execute_multi_array_udf()
,
execute_sql_query()
,
get_udf_info()
,
group_info()
,
list_arrays()
,
list_groups()
,
login()
,
register_array()
,
register_udf()
,
update_udf_info()
,
user_profile()