Skip to main content

CREATE FUNCTION

Introduced or updated: v1.2.116

Creates an external function.

Syntax

CREATE FUNCTION [IF NOT EXISTS] <function_name> 
AS (<input_param_types>) RETURNS <return_type> LANGUAGE <language_name>
HANDLER = '<handler_name>' ADDRESS = '<udf_server_address>'
[DESC='<description>']
ParameterDescription
<function_name>The name of the function.
<lambda_expression>The lambda expression or code snippet defining the function's behavior.
DESC='<description>'Description of the UDF.
<<input_param_names>A list of input parameter names. Separated by comma.
<<input_param_types>A list of input parameter types. Separated by comma.
<return_type>The return type of the function.
LANGUAGESpecifies the language used to write the function. Available values: python.
HANDLER = '<handler_name>'Specifies the name of the function's handler.
ADDRESS = '<udf_server_address>'Specifies the address of the UDF server.

Examples

See Usage Examples.

Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today