title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/user_defined_functions.md)

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

Columns:

**Loading Status**

- `name` ([String](/docs/sql-reference/data-types/string)) — UDF name.
- `load_status` ([Enum8](/docs/sql-reference/data-types/enum)) — Loading status: `Success` (UDF loaded and ready), `Failed` (UDF failed to load).
- `loading_error_message` ([String](/docs/sql-reference/data-types/string)) — Detailed error message when loading failed. Empty if loaded successfully.
- `last_successful_update_time` ([Nullable(DateTime)](/docs/sql-reference/data-types/datetime)) — Timestamp of the last successful load. `NULL` if never succeeded.
- `loading_duration_ms` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Time spent loading the UDF, in milliseconds.

**UDF Configuration**

- `type` ([Enum8](/docs/sql-reference/data-types/enum)) — UDF type: `executable` (single process per block) or `executable_pool` (persistent process pool).
- `command` ([String](/docs/sql-reference/data-types/string)) — Script or command to execute, including arguments.
- `format` ([String](/docs/sql-reference/data-types/string)) — Data format for I/O (e.g., `TabSeparated`, `JSONEachRow`).
- `return_type` ([String](/docs/sql-reference/data-types/string)) — Function return type (e.g., `String`, `UInt64`).
- `return_name` ([String](/docs/sql-reference/data-types/string)) — Optional return value identifier. Empty if not configured.
- `argument_types` ([Array(String)](/docs/sql-reference/data-types/array)) — Array of argument types.
- `argument_names` ([Array(String)](/docs/sql-reference/data-types/array)) — Array of argument names. Empty strings for unnamed arguments.

**Execution Parameters**

- `max_command_execution_time` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Maximum seconds to process a data block. Only for `executable_pool` type.
- `command_termination_timeout` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Seconds before sending SIGTERM to command process.
- `command_read_timeout` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Milliseconds for reading from command stdout.
- `command_write_timeout` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Milliseconds for writing to command stdin.
- `pool_size` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Number of process instances in pool. Only for `executable_pool` type.
- `send_chunk_header` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether to send row count before each data chunk (1 = true, 0 = false).
- `execute_direct` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether to execute command directly (1) or via `/bin/bash` (0).
- `lifetime` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Reload interval in seconds. 0 means reload is disabled.
- `deterministic` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether function returns the same result for same arguments (1 = true, 0 = false).

**Example**

View all UDFs and their loading status:

```
SELECT
    name,
    load_status,
    type,
    command,
    return_type,
    argument_types
FROM system.user_defined_functions
FORMAT Vertical;
```

```
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:

```
SELECT
    name,
    loading_error_message
FROM system.user_defined_functions
WHERE load_status = 'Failed';
```

**See Also**

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

Was this page helpful?