> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing loading status and configuration metadata for User-Defined Functions (UDFs).

# system.user_defined_functions

<h2 id="description">
  Description
</h2>

Contains loading status, error information, and configuration metadata for [User-Defined Functions (UDFs)](/reference/functions/regular-functions/udf).

<h2 id="columns">
  Columns
</h2>

* `name` ([String](/reference/data-types)) — UDF name.
* `load_status` ([Enum8('Success' = 0, 'Failed' = 1)](/reference/data-types)) — Loading status.Possible values:
  * **Success** — UDF loaded and ready to use
  * **Failed** — UDF failed to load (see field 'loading\_error\_message' for details).
* `loading_error_message` ([String](/reference/data-types)) — Detailed error message when loading failed. Empty if loaded successfully.
* `last_successful_update_time` ([Nullable(DateTime)](/reference/data-types)) — Timestamp of the last successful update. NULL if never succeeded.
* `loading_duration_ms` ([UInt64](/reference/data-types)) — Time spent loading the UDF, in milliseconds.
* `type` ([Enum8('executable' = 0, 'executable\_pool' = 1)](/reference/data-types)) — UDF type: 'executable' (single process) or 'executable\_pool' (process pool).
* `command` ([String](/reference/data-types)) — Script or command to execute for this UDF.
* `format` ([String](/reference/data-types)) — Data format for I/O (e.g., 'TabSeparated', 'JSONEachRow').
* `return_type` ([String](/reference/data-types)) — Function return type (e.g., 'String', 'UInt64').
* `return_name` ([String](/reference/data-types)) — Optional return value identifier. Empty if not configured.
* `argument_types` ([Array(String)](/reference/data-types)) — Array of argument types (e.g., \['String', 'UInt64']).
* `argument_names` ([Array(String)](/reference/data-types)) — Array of argument names. Empty strings for unnamed arguments.
* `max_command_execution_time` ([UInt64](/reference/data-types)) — Maximum seconds to process a data block. Only for 'executable\_pool' type.
* `command_termination_timeout` ([UInt64](/reference/data-types)) — Seconds before sending SIGTERM to command process.
* `command_read_timeout` ([UInt64](/reference/data-types)) — Milliseconds for reading from command stdout.
* `command_write_timeout` ([UInt64](/reference/data-types)) — Milliseconds for writing to command stdin.
* `pool_size` ([UInt64](/reference/data-types)) — Number of command process instances. Only for 'executable\_pool' type.
* `send_chunk_header` ([UInt8](/reference/data-types)) — Whether to send row count before each data chunk (boolean).
* `execute_direct` ([UInt8](/reference/data-types)) — Whether to execute command directly (1) or via /bin/bash (0).
* `lifetime` ([UInt64](/reference/data-types)) — Reload interval in seconds. 0 means reload is disabled.
* `deterministic` ([UInt8](/reference/data-types)) — Whether function returns the same result for the same arguments (boolean).

<h2 id="example">
  Example
</h2>

View all UDFs and their loading status:

```sql theme={null}
SELECT
    name,
    load_status,
    type,
    command,
    return_type,
    argument_types
FROM system.user_defined_functions
FORMAT Vertical;
```

```response theme={null}
Row 1:
──────
name:           my_sum_udf
load_status:    Success
type:           executable
command:        /var/lib/clickhouse/user_scripts/sum.py
return_type:    UInt64
argument_types: ['UInt64','UInt64']
```

Find failed UDFs:

```sql theme={null}
SELECT
    name,
    loading_error_message
FROM system.user_defined_functions
WHERE load_status = 'Failed';
```

<h2 id="see-also">
  See Also
</h2>

* [User-Defined Functions](/reference/functions/regular-functions/udf) — How to create and configure UDFs.
