Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ doc_type: 'guide'
keywords: ['user defined function', 'UDF']
---

import PrivatePreviewBadge from "/snippets/components/PrivatePreviewBadge/PrivatePreviewBadge.jsx";
import BetaBadge from "/snippets/components/BetaBadge/BetaBadge.jsx";

User-defined functions (UDF) allow users to extend the behavior of ClickHouse beyond what is offered by over a thousand different out-of-box [functions](/core/reference/functions/regular-functions/regular-functions-index).

In ClickHouse Cloud, there are two ways to create user-defined functions:
1. Using SQL
2. Using the UI and your own code (private preview)
2. Using the UI and your own code (public beta)

## SQL user-defined functions {#sql-udfs}

Expand Down Expand Up @@ -62,14 +62,10 @@ This means:

## User-defined functions created via UI {#ui-udfs}

<PrivatePreviewBadge/>
<BetaBadge/>

ClickHouse Cloud offers a UI configuration experience for creating user-defined functions.

<Note>
If you are interested in trying out this feature, please contact [support](https://clickhouse.com/support/program) to enroll in private preview.
</Note>

In this example we'll create the same simple executable user-defined function `isBusinessHours` that checks if a certain timestamp falls inside of regular business hours.
Previously we created it using SQL, but this time we will create it using Python and configure it via the UI.

Expand Down Expand Up @@ -133,6 +129,12 @@ Now compress the file into a ZIP archive:
```bash
zip is_business_hours.zip main.py
```

<Warning>
**Symlinks are not allowed**

ClickHouse Cloud rejects UDF archives that contain symbolic links. Make sure your ZIP bundle contains only regular files and directories — uploads with symlinks will fail validation.
</Warning>
</Step>
<Step>
### Create a UDF via the UI {#create-udf-via-ui}
Expand Down
2 changes: 1 addition & 1 deletion products/cloud/guides/cloud-compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Federated queries with some external database and table engines, such as SQLite,

### User defined functions {#user-defined-functions}

User-defined functions in ClickHouse Cloud are in [private preview](/core/reference/functions/regular-functions/udf).
User-defined functions in ClickHouse Cloud are in [public beta](/core/reference/functions/regular-functions/udf).

#### Settings behavior {#udf-settings-behavior}

Expand Down