Updated on 2025-08-25 GMT+08:00

UDF Configuration

update_udf_runtime_config

Description: You can execute this built-in function to specify the Python user-defined function (UDF) actor configuration parameters for certain UDFs or define configuration parameters for all UDF executions, including the number of CPU cores, memory usage, and parallelism degree used by the actor.

Syntax:

1
update_udf_runtime_config(array['schema.func:memory=xxx,cpu=xxx,concurrency=xxx','default:memory=xxx,cpu=xxx,concurrency=xxx'])

Input parameters:

  • schema: name of the database where the UDF is.
  • func: name of the UDF function.
  • cpu: number of CPU cores (in millicores) used by the Python UDF actor.
  • memory: memory usage (in MB) of the Python UDF actor.
  • concurrency: parallelism degree of the Python UDF actor.

Return value: none

Precautions: If a specific UDF has its own configuration, that configuration takes precedence. If not specified, the default configuration is applied. If neither is defined, the fixed configuration cpu=500, memory=500, concurrency=1 is used.