Python UDF
This section describes GUC parameters for Python UDFs.
Parameter Description
| Parameter | Type | Description |
|---|---|---|
| python_udf_spec_options | String | Definition: Specifies the default values of common parameters in WITH ARGUMENTS during Python UDF execution. If a parameter is not specified in WITH ARGUMENTS, the GUC value set by python_udf_spec_options is used by default. The priority of parameters explicitly specified in WITH ARGUMENTS is higher than that of the GUC value.
Range: A string, in the format of comma-separated (key:value) pairs. Currently, six parameters are supported: timeout, cpu, memory, arch, apu, and concurrency. For details, see WITH ARGUMENTS Syntax. Default Value: Empty (''). |
| enable_udf_global_actor_pool | Boolean | Definition: Specifies whether to enable the global Python UDF actor pool. After this function is enabled, Python UDF actors are managed by the global CN instead of each DN. You need to enable udf_split first (by setting sql_opt_options='on(udf_split)'). Otherwise, this parameter does not take effect. Range: Boolean (on/off). Default Value: off. |
| enable_udf_scheduler | Boolean | Definition: Specifies whether to enable the global dynamic scheduling policy for Python UDFs. After this function is enabled, the system dynamically schedules Python UDF actors based on the running time of different Python UDFs in statements, reducing the execution bottleneck of a single UDF. This parameter takes effect only when udf_split (by setting sql_opt_options='on(udf_split)') and enable_udf_global_actor_pool are enabled and the statement does not contain multi-branch operations such as JOIN. Range: Boolean (on/off). Default Value: off. |
| enable_udf_log_trace | Boolean | Definition: Specifies whether to enable the Python UDF log traceability function. After this function is enabled, the system automatically injects the SESSIONID/STATEMENTID tag to all logs generated during UDF execution (print, logging, loguru, and warnings). Range: Boolean (on/off). Default Value: on. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot