Skip to main content
Version: current [25.0.x]

SYS.USER_DEFINED_FUNCTIONS

The sys.user_defined_functions table contains metadata for user defined functions (UDFs) that have been installed in the Dremio instance.

Syntax
SELECT *
FROM sys.user_defined_functions

Example Output

argListnamesqlreturnTypecreatedAtmodifiedAt
[FunctionArg{name=salary, rawDataType=<ByteString@55362274 size=116>}]"@dremio".get_salarySELECT CASE WHEN QUERY_USER() = 'noone' THEN "salary" ELSE 0 ENDReturnType{rawDataType=<ByteString@1b0f0d85 size=116>}2022-06-05 21:35:21.4051970-01-01 00:00:00.000
[FunctionArg{name=id, rawDataType=<ByteString@ad3e1e8 size=120>}]"@dremio".id_filterSELECT QUERY_USER() = 'dremio' AND "id" % 2 = 0ReturnType{rawDataType=<ByteString@6953a612 size=108>}2022-06-13 18:43:27.0201970-01-01 00:00:00.000
null"@dremio".helloSELECT 'Hello World!'ReturnType{rawDataType=<ByteString@2baec0f6 size=108>}2022-06-17 15:08:57.0592022-07-01 17:04:09.032
nullcy.helloSELECT 'Hello World!'ReturnType{rawDataType=<ByteString@5fb990a7 size=108>}2022-06-17 15:09:49.5051970-01-01 00:00:00.000

Fields

FieldData TypeDescription
argListvarcharThe ordered list of arguments for this UDF. The value will be null if there are no arguments.
namevarcharThe name of the function.
sqlvarcharThe SQL that defines the UDF.
returnTypevarcharThe return type of the UDF.
createdAttimestampThe timestamp for when the UDF was created.
modifiedAttimestampThe timestamp for when the UDF was last modified.