# functions

## Description

Exposes metadata about user-defined functions (UDFs) registered in the organization. Only functions on which the current role has USAGE privileges are returned.

## Syntax

```sql
SELECT * FROM deltastream.sys."functions";
```

## Columns

| Column                    | Type           | Nullable | Description                                                                |
| ------------------------- | -------------- | -------- | -------------------------------------------------------------------------- |
| `name`                    | VARCHAR        | No       | Name of the function.                                                      |
| `signature`               | VARCHAR        | No       | Full function signature including parameter types, e.g. `myfunc(VARCHAR)`. |
| `class_name`              | VARCHAR        | No       | Fully qualified Java class name implementing the function.                 |
| `type`                    | VARCHAR        | No       | Function type. Currently `udf`.                                            |
| `language`                | VARCHAR        | No       | Implementation language. Currently `java`.                                 |
| `function_source_name`    | VARCHAR        | No       | Name of the function source that contains the function implementation.     |
| `owner`                   | VARCHAR        | No       | The role that owns this resource.                                          |
| `created_by_role`         | VARCHAR        | No       | The role that created this resource.                                       |
| `created_by_role_deleted` | BOOLEAN        | No       | Whether the creating role has since been deleted.                          |
| `created_by`              | VARCHAR        | No       | The user that created this resource.                                       |
| `created_at`              | TIMESTAMP\_LTZ | No       | Timestamp when this resource was created.                                  |
| `updated_by_role`         | VARCHAR        | No       | The role that last updated this resource.                                  |
| `updated_by_role_deleted` | BOOLEAN        | No       | Whether the last updating role has since been deleted.                     |
| `updated_by`              | VARCHAR        | No       | The user that last updated this resource.                                  |
| `updated_at`              | TIMESTAMP\_LTZ | No       | Timestamp when this resource was last updated.                             |
| `organization_id`         | VARCHAR        | No       | The unique identifier of the organization this resource belongs to.        |

## Examples

List all user-defined functions:

```sql
SELECT * FROM deltastream.sys."functions";
```

```sh
[{"name":"dsupper","signature":"dsupper(VARCHAR)","class_name":"demo.DSUpperCase","type":"udf","language":"java","function_source_name":"functions","owner":"sysadmin","created_by_role":"sysadmin","created_by_role_deleted":false,"created_by":"user@example.com","created_at":"2025-11-14T12:28:27.534Z","updated_by_role":"sysadmin","updated_by_role_deleted":false,"updated_by":"user@example.com","updated_at":"2025-11-14T12:28:27.534Z","organization_id":"00000000-0000-0000-0000-000000000001"},{"name":"secret_udf","signature":"secret_udf(VARCHAR, ARRAY<VARCHAR>, STRUCT<a VARCHAR, b VARCHAR, c VARCHAR, d VARCHAR>)","class_name":"demo.SecretUDF","type":"udf","language":"java","function_source_name":"functions","owner":"sysadmin","created_by_role":"sysadmin","created_by_role_deleted":false,"created_by":"user@example.com","created_at":"2025-12-01T15:37:56.907Z","updated_by_role":"sysadmin","updated_by_role_deleted":false,"updated_by":"user@example.com","updated_at":"2025-12-01T15:37:56.907Z","organization_id":"00000000-0000-0000-0000-000000000001"}]
```

## See Also

* [System Tables Overview](https://docs.deltastream.io/reference/sql-syntax/systables)
* [LIST FUNCTIONS](https://docs.deltastream.io/reference/sql-syntax/command/list-functions)
* [CREATE FUNCTION](https://docs.deltastream.io/reference/sql-syntax/ddl/create-function)
