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.
SyntaxSELECT *
FROM sys.user_defined_functions
Example Output
argList | name | sql | returnType | createdAt | modifiedAt |
---|---|---|---|---|---|
[FunctionArg{name=salary, rawDataType=<ByteString@55362274 size=116>}] | "@dremio".get_salary | SELECT CASE WHEN QUERY_USER() = 'noone' THEN "salary" ELSE 0 END | ReturnType{rawDataType=<ByteString@1b0f0d85 size=116>} | 2022-06-05 21:35:21.405 | 1970-01-01 00:00:00.000 |
[FunctionArg{name=id, rawDataType=<ByteString@ad3e1e8 size=120>}] | "@dremio".id_filter | SELECT QUERY_USER() = 'dremio' AND "id" % 2 = 0 | ReturnType{rawDataType=<ByteString@6953a612 size=108>} | 2022-06-13 18:43:27.020 | 1970-01-01 00:00:00.000 |
null | "@dremio".hello | SELECT 'Hello World!' | ReturnType{rawDataType=<ByteString@2baec0f6 size=108>} | 2022-06-17 15:08:57.059 | 2022-07-01 17:04:09.032 |
null | cy.hello | SELECT 'Hello World!' | ReturnType{rawDataType=<ByteString@5fb990a7 size=108>} | 2022-06-17 15:09:49.505 | 1970-01-01 00:00:00.000 |
Fields
Field | Data Type | Description |
---|---|---|
argList | varchar | The ordered list of arguments for this UDF. The value will be null if there are no arguments. |
name | varchar | The name of the function. |
sql | varchar | The SQL that defines the UDF. |
returnType | varchar | The return type of the UDF. |
createdAt | timestamp | The timestamp for when the UDF was created. |
modifiedAt | timestamp | The timestamp for when the UDF was last modified. |