You can define your own functions (including table functions) and call these functions in RisingWave. With the user-defined function (UDF), you can tailor RisingWave to your needs and take advantage of the power and flexibility of Python and Java to perform complex and customized data processing and analysis tasks.
See User-defined functions for details.
CREATE FUNCTION command to declare the UDFs before you can use them in SQL queries like any built-in functions.
CREATE FUNCTION function_name ( argument_type [, ...] )
[ RETURNS return_type | RETURNS TABLE ( column_name column_type [, ...] ) ]
[ LANGUAGE language_name ]
USING LINK 'udf_server_address';
|Parameter or clause
|The name of the UDF that you want to declare in RisingWave.
|The data type of the input parameter(s) that the UDF expects to receive.
|Use this if the function returns a single value (i.e., scalar). It specifies the data type of the return value from the UDF.
The struct type, which can contain multiple values, is supported. But the field names must be consistent between Python and SQL definitions, or it will be considered a type mismatch.
|Use this if the function is a table-valued function (TVF). It specifies the structure of the table that the UDF returns.
|Optional. Specifies the programming language used to implement the UDF.
java are supported.
|Specifies the function name defined in the UDF server.
|USING LINK 'udf_server_address'
|Specifies the UDF server address.
If you are running RisingWave in your local environment, the address is
If you are running RisingWave using Docker, the address is
SHOW FUNCTIONS — Show all user-defined functions.
DROP FUNCTION — Drop a user-defined function.