From 8ad1cd3e3f3f042b5cc911a749b203581a803474 Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 17 Jun 2026 10:27:28 -0500 Subject: [PATCH 1/2] Clarify Cloud UDF dependency handling and version updates Add two notes to the Cloud UDF guide based on user feedback in Slack: - requirements.txt is the recommended way to install Python dependencies; bundling directly in the ZIP requires cached packages for both CPU architectures - the Edit panel only manages service assignment; changing a UDF's code requires creating a new version Refs DOC-833 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../03_sql_console_features/05_user_defined_functions.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md b/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md index 8a3725f3e9c..24954301907 100644 --- a/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md +++ b/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md @@ -93,6 +93,10 @@ requests>=2.28.0 numpy>=1.23.0 ``` +:::note[Let Cloud install dependencies] +The recommended path is to list your packages in `requirements.txt`, which ClickHouse Cloud prepares for you. You can instead bundle dependencies directly in the ZIP, but then you must include cached packages for **both CPU architectures**, so `requirements.txt` is simpler. +::: + :::note ClickHouse Cloud expects to find `main.py` in the zip file you will upload via the UI in the next step. If you name the file something else you will encounter an error. @@ -167,6 +171,10 @@ true false ### Create a new version {#create-new-version} +:::note[Editing vs. creating a new version] +To change a UDF's code, create a new version — uploading a file in the **Edit** panel won't replace the deployed code. **Edit** only manages which services the UDF is assigned to. +::: + 1. From the Cloud console homepage, click on the name of your organization in the bottom-left menu. 2. Select **User-defined functions** from the menu. 3. Select the three dots under **Actions** for the `isBusinessHours` UDF, click **Create new version** From 2b899046d9c2b55c27bf8a812a62d1a91463c776 Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 17 Jun 2026 10:44:33 -0500 Subject: [PATCH 2/2] Demote UDF guidance notes to prose Reduce admonition pile-up on the page: the dependency-handling and "Edit vs. create new version" guidance read better as body text and were crowding the genuine caveats. Convert both from :::note callouts to prose, leaving only the warranted admonitions. Refs DOC-833 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../05_user_defined_functions.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md b/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md index 24954301907..c1c3fb46962 100644 --- a/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md +++ b/docs/cloud/features/03_sql_console_features/05_user_defined_functions.md @@ -86,17 +86,13 @@ for line in sys.stdin: EOF ``` -If your Python script imports third-party packages, you must create a `requirements.txt` file listing those dependencies. For example: +If your Python script imports third-party packages, list them in a `requirements.txt` file and ClickHouse Cloud installs them for you. You can instead bundle dependencies directly in the ZIP, but then you must include cached packages for both CPU architectures, so `requirements.txt` is simpler. For example: ```text requests>=2.28.0 numpy>=1.23.0 ``` -:::note[Let Cloud install dependencies] -The recommended path is to list your packages in `requirements.txt`, which ClickHouse Cloud prepares for you. You can instead bundle dependencies directly in the ZIP, but then you must include cached packages for **both CPU architectures**, so `requirements.txt` is simpler. -::: - :::note ClickHouse Cloud expects to find `main.py` in the zip file you will upload via the UI in the next step. If you name the file something else you will encounter an error. @@ -171,9 +167,7 @@ true false ### Create a new version {#create-new-version} -:::note[Editing vs. creating a new version] -To change a UDF's code, create a new version — uploading a file in the **Edit** panel won't replace the deployed code. **Edit** only manages which services the UDF is assigned to. -::: +To change a UDF's code, create a new version. The **Edit** panel only manages which services a UDF is assigned to; uploading a file there won't replace the deployed code. 1. From the Cloud console homepage, click on the name of your organization in the bottom-left menu. 2. Select **User-defined functions** from the menu.