udf
cloud.udf
Functions
Name | Description |
---|---|
delete | Deletes a registered udf |
deregister | De-registers a registered udf, by de-registering the array that it |
exec | Run a user defined function, synchronously, returning only the result. |
exec_async | Run a user defined function, asynchronously. |
exec_base | Run a user defined function, returning the result and metadata. |
info | Fetch info on a registered udf |
register_generic_udf | |
register_multi_array_udf | |
register_single_array_udf | |
register_udf | |
share | Share a registered udf |
unshare | Share a registered udf |
update_generic_udf | |
update_single_array_udf | |
update_udf |
delete
*, async_req=False) cloud.udf.delete(uri,
Deletes a registered udf
Parameters
Name | Type | Description | Default |
---|---|---|---|
uri | str | TileDB URI of the udf, defaults to None. | required |
async_req | bool | Return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
None | deleted udf details |
deregister
*, async_req=False) cloud.udf.deregister(uri,
De-registers a registered udf, by de-registering the array that it is registered on. This does not physically delete the array, it will remain in your bucket. All access to the array and cloud metadata will be removed.
Parameters
Name | Type | Description | Default |
---|---|---|---|
uri | str | TileDB URI of the array. | required |
async_req | bool | Return future instead of results for async support | False |
exec
exec(*args, **kwargs) cloud.udf.
Run a user defined function, synchronously, returning only the result.
Arguments are exactly as in :func:exec_base
.
exec_async
*args, **kwargs) cloud.udf.exec_async(
Run a user defined function, asynchronously.
Arguments are exactly as in :func:exec_base
.
exec_base
cloud.udf.exec_base(
func*args
=None
name=None
namespace='default'
image_name='deflate'
http_compressor=True
include_source_lines=None
task_name='tiledb_json'
result_format=None
result_format_version=False
store_results=()
stored_param_uuids=None
timeout=None
resource_class=True
_download_results=None
_server_graph_uuid=None
_client_node_uuid=None
access_credentials_name**kwargs
)
Run a user defined function, returning the result and metadata.
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | Union[str, Callable, Any] | The function to call, either as a callable function, or as the name of a registered user-defined function. (If name is set, this is instead prepended to args for backwards compatibility.) |
required |
args | Any | The arguments to pass to the function. | () |
name | Optional[str] | DEPRECATED. If present, the name of the user-defined function to run. | None |
namespace | Optional[str] | namespace to run udf under | None |
image_name | str | udf image name to use, useful for testing beta features | 'default' |
http_compressor | Optional[str] | set http compressor for results | 'deflate' |
include_source_lines | bool | True to send the source code of your UDF to the server with your request. (This means it can be shown to you in stack traces if an error occurs.) False to send only compiled Python bytecode. | True |
task_name | str | optional name to assign the task for logging and audit purposes | None |
result_format | ResultFormat | result serialization format | 'tiledb_json' |
result_format_version | str | Deprecated and ignored. | None |
store_results | bool | True to temporarily store results on the server side for later retrieval (in addition to downloading them). | False |
timeout | int | Timeout for UDF in seconds | None |
resource_class | Optional[str] | The name of the resource class to use. Resource classes define maximum limits for cpu and memory usage. | None |
_download_results | bool | True to download and parse results eagerly. False to not download results by default and only do so lazily (e.g. for an intermediate node in a graph). | True |
_server_graph_uuid | Optional[uuid.UUID] | If this function is being executed within a DAG, the server-generated ID of the graph’s log. Otherwise, None. | None |
_client_node_uuid | Optional[uuid.UUID] | If this function is being executed within a DAG, the ID of this function’s node within the graph. Otherwise, None. | None |
kwargs | named arguments to pass to function | {} |
info
=None, name=None, async_req=False) cloud.udf.info(namespace
Fetch info on a registered udf
Parameters
Name | Type | Description | Default |
---|---|---|---|
namespace | namespace to filter to | None |
|
name | name of udf to get info | None |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
registered udf details |
register_generic_udf
cloud.udf.register_generic_udf(
func
name=None
namespace=None
image_name=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
image_name | optional image name | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
register_multi_array_udf
cloud.udf.register_multi_array_udf(
func
name=None
namespace=None
image_name=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
image_name | optional image name | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
register_single_array_udf
cloud.udf.register_single_array_udf(
func
name=None
namespace=None
image_name=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
image_name | optional image name | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
register_udf
cloud.udf.register_udf(
func
name=None
namespace=None
image_nametype=None
=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
image_name | optional image name | None |
|
type | type of udf, generic or single_array | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
update_generic_udf
cloud.udf.update_generic_udf(
func
name=None
namespace=None
image_name=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
image_name | optional image name | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
update_single_array_udf
cloud.udf.update_single_array_udf(
func
name=None
namespace=None
image_name=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
image_name | optional image name | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|
update_udf
cloud.udf.update_udf(
func
name=None
namespace=None
update_name=None
image_nametype=None
=None
license_id=None
license_text=None
readme=True
include_source_lines=False
async_req )
Parameters
Name | Type | Description | Default |
---|---|---|---|
func | function to update register | required | |
name | name of udf to register | required | |
namespace | namespace to register in | None |
|
update_name | new name for udf - physical folder will not be renamed, just the registered array name | None |
|
image_name | optional image name | None |
|
type | type of udf, generic or single_array | None |
|
license_id | license id for udf according to https://spdx.org/licenses/ | None |
|
license_text | text of license for udf | None |
|
readme | readme of udf | None |
|
include_source_lines | disables sending sources lines of function along with udf | True |
|
async_req | return future instead of results for async support | False |
Returns
Name | Type | Description |
---|---|---|