メインコンテンツへスキップ
POST
Create UDF
Creates a new UDF. See User-defined functions in Cloud.

Permission

The API key must have the control-plane:organization:manage-udfs permission.

承認

Authorization
string
header
必須

Use key ID and key secret obtained in ClickHouse Cloud console: https://clickhouse.com/docs/cloud/manage/openapi

パスパラメータ

organizationId
string<uuid>
必須

ID of the requested organization.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$

ボディ

application/json
uploadId
string<uuid>
必須

Identifier of the uploaded source archive.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
runtime
enum<string>
必須

Runtime used to execute the UDF command.

利用可能なオプション:
python3.11,
native
arguments
object[]
必須

Arguments passed to the UDF command.

returnType
string
必須

ClickHouse data type of the returned value.

type
string
必須

Executable UDF type.

Allowed value: "executable"
functionName
string
必須

Name of the UDF. Unique within the organization.

Maximum string length: 64
Pattern: ^[A-Za-z][A-Za-z0-9_]*$
returnName
string | null

Name of the returned value, or null when unnamed.

Pattern: ^[A-Za-z][A-Za-z0-9_]*$
commandReadTimeout
integer
デフォルト:10000

Command stdout read timeout in milliseconds.

commandWriteTimeout
integer
デフォルト:10000

Command stdin write timeout in milliseconds.

memoryLimitMib
integer | null

Maximum memory, in MiB, available to each UDF sandbox process. Null uses the sandbox default.

必須範囲: 1 <= x <= 1048576
sendChunkHeader
boolean
デフォルト:false

Whether ClickHouse sends a row-count chunk header.

deterministic
boolean
デフォルト:false

Marks the UDF as deterministic so ClickHouse can reuse cached query results. Only set this when the UDF always returns the same result for the same arguments.

format
string
デフォルト:TabSeparated

Input and output format used by the UDF command.

sandboxType
enum<string>
デフォルト:basic

Sandbox isolation level.

利用可能なオプション:
basic,
netenable
poolSize
null

Always null — an executable UDF has no command pool.

maxCommandExecutionTime
integer | null
デフォルト:10

Maximum command execution time in seconds.

必須範囲: x > 0

レスポンス

UDF created and building.

status
integer
必須

HTTP status code.

例:

201

requestId
string<uuid>
必須

Unique id assigned to every request. UUIDv4

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
result
object
必須