更新 ClickPipe 设置
此端点处于 Beta 阶段。 API 契约稳定,预计未来不会出现破坏性变更。
更新指定 ClickPipe 的高级设置。发送键值对,其中值可以是字符串、数字或布尔值。
PUT
/
v1
/
organizations
/
{organizationId}
/
services
/
{serviceId}
/
clickpipes
/
{clickPipeId}
/
settings
更新 ClickPipe 设置
curl --request PUT \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"clickhouse_max_download_threads": 4,
"clickhouse_max_insert_threads": 1,
"clickhouse_max_threads": 8,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_parallel_distributed_insert_select": 2,
"clickhouse_parallel_view_processing": false,
"object_storage_concurrency": 1,
"object_storage_max_file_count": 100,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_polling_interval_ms": 30000,
"object_storage_use_cluster_function": true,
"streaming_max_insert_wait_ms": 5000
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings"
payload = {
"clickhouse_max_download_threads": 4,
"clickhouse_max_insert_threads": 1,
"clickhouse_max_threads": 8,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_parallel_distributed_insert_select": 2,
"clickhouse_parallel_view_processing": False,
"object_storage_concurrency": 1,
"object_storage_max_file_count": 100,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_polling_interval_ms": 30000,
"object_storage_use_cluster_function": True,
"streaming_max_insert_wait_ms": 5000
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clickhouse_max_download_threads: 4,
clickhouse_max_insert_threads: 1,
clickhouse_max_threads: 8,
clickhouse_min_insert_block_size_bytes: 1073741824,
clickhouse_parallel_distributed_insert_select: 2,
clickhouse_parallel_view_processing: false,
object_storage_concurrency: 1,
object_storage_max_file_count: 100,
object_storage_max_insert_bytes: 10737418240,
object_storage_polling_interval_ms: 30000,
object_storage_use_cluster_function: true,
streaming_max_insert_wait_ms: 5000
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clickhouse_max_download_threads' => 4,
'clickhouse_max_insert_threads' => 1,
'clickhouse_max_threads' => 8,
'clickhouse_min_insert_block_size_bytes' => 1073741824,
'clickhouse_parallel_distributed_insert_select' => 2,
'clickhouse_parallel_view_processing' => false,
'object_storage_concurrency' => 1,
'object_storage_max_file_count' => 100,
'object_storage_max_insert_bytes' => 10737418240,
'object_storage_polling_interval_ms' => 30000,
'object_storage_use_cluster_function' => true,
'streaming_max_insert_wait_ms' => 5000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings"
payload := strings.NewReader("{\n \"clickhouse_max_download_threads\": 4,\n \"clickhouse_max_insert_threads\": 1,\n \"clickhouse_max_threads\": 8,\n \"clickhouse_min_insert_block_size_bytes\": 1073741824,\n \"clickhouse_parallel_distributed_insert_select\": 2,\n \"clickhouse_parallel_view_processing\": false,\n \"object_storage_concurrency\": 1,\n \"object_storage_max_file_count\": 100,\n \"object_storage_max_insert_bytes\": 10737418240,\n \"object_storage_polling_interval_ms\": 30000,\n \"object_storage_use_cluster_function\": true,\n \"streaming_max_insert_wait_ms\": 5000\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"clickhouse_max_download_threads\": 4,\n \"clickhouse_max_insert_threads\": 1,\n \"clickhouse_max_threads\": 8,\n \"clickhouse_min_insert_block_size_bytes\": 1073741824,\n \"clickhouse_parallel_distributed_insert_select\": 2,\n \"clickhouse_parallel_view_processing\": false,\n \"object_storage_concurrency\": 1,\n \"object_storage_max_file_count\": 100,\n \"object_storage_max_insert_bytes\": 10737418240,\n \"object_storage_polling_interval_ms\": 30000,\n \"object_storage_use_cluster_function\": true,\n \"streaming_max_insert_wait_ms\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clickhouse_max_download_threads\": 4,\n \"clickhouse_max_insert_threads\": 1,\n \"clickhouse_max_threads\": 8,\n \"clickhouse_min_insert_block_size_bytes\": 1073741824,\n \"clickhouse_parallel_distributed_insert_select\": 2,\n \"clickhouse_parallel_view_processing\": false,\n \"object_storage_concurrency\": 1,\n \"object_storage_max_file_count\": 100,\n \"object_storage_max_insert_bytes\": 10737418240,\n \"object_storage_polling_interval_ms\": 30000,\n \"object_storage_use_cluster_function\": true,\n \"streaming_max_insert_wait_ms\": 5000\n}"
response = http.request(request)
puts response.read_body{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"clickhouse_max_download_threads": 4,
"clickhouse_max_insert_threads": 1,
"clickhouse_max_threads": 8,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_parallel_distributed_insert_select": 2,
"clickhouse_parallel_view_processing": false,
"object_storage_concurrency": 1,
"object_storage_max_file_count": 100,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_polling_interval_ms": 30000,
"object_storage_use_cluster_function": true,
"streaming_max_insert_wait_ms": 5000
},
"status": 200
}{
"error": "<string>",
"status": 400
}授权
使用在 ClickHouse Cloud 控制台中获取的 key ID 和 key secret:https://clickhouse.com/docs/cloud/manage/openapi
路径参数
拥有该服务的组织 ID。
拥有该 ClickPipe 的服务 ID。
要更新其设置的 ClickPipe ID。
请求体
application/json
最大下载线程数。最大并发下载线程数。
必填范围:
0 <= x <= 32示例:
4
最大插入线程数。最大并发插入线程数。
必填范围:
0 <= x <= 16示例:
1
最大线程数。文件处理的最大并发线程数。
必填范围:
0 <= x <= 64示例:
8
最小插入数据块大小(字节)。插入所需的数据块最小大小(以字节为单位)。
必填范围:
0 <= x <= 10737418240示例:
1073741824
并行分布式 insert select。并行分布式 insert select 设置。
必填范围:
0 <= x <= 2示例:
2
并行视图处理。是否启用并发推送到已附加视图,而不是按顺序推送。
示例:
false
对象存储并发度。并发文件处理线程数。
必填范围:
1 <= x <= 35示例:
1
最大文件数。单个插入批次中可处理的最大文件数。
必填范围:
1 <= x <= 10000示例:
100
最大插入字节数。单个插入批次中处理的字节数。
必填范围:
10485760 <= x <= 53687091200示例:
10737418240
对象存储轮询时间间隔。配置连续摄取查询新对象存储数据的刷新时间间隔。
必填范围:
100 <= x <= 3600000示例:
30000
使用 cluster 函数。是否使用 ClickHouse cluster 函数进行分布式处理。
示例:
true
流式最大插入等待时间。配置将数据插入 ClickHouse 前的最长等待时间。
必填范围:
500 <= x <= 60000示例:
5000
最后修改于 2026年6月19日
上一页
更新 ClickPipe 状态**此端点处于 Beta 阶段。** API 契约稳定,预计未来不会出现破坏性变更。<br /><br />启动、停止或重新同步 ClickPipe。停止 ClickPipe 将停止其在任何状态下的摄取过程。只有处于“Stopped”或“Failed”状态的 ClickPipe 才允许启动。重新同步仅适用于 Postgres 管道,且可在任何状态下执行。
下一页
⌘I
更新 ClickPipe 设置
curl --request PUT \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"clickhouse_max_download_threads": 4,
"clickhouse_max_insert_threads": 1,
"clickhouse_max_threads": 8,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_parallel_distributed_insert_select": 2,
"clickhouse_parallel_view_processing": false,
"object_storage_concurrency": 1,
"object_storage_max_file_count": 100,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_polling_interval_ms": 30000,
"object_storage_use_cluster_function": true,
"streaming_max_insert_wait_ms": 5000
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings"
payload = {
"clickhouse_max_download_threads": 4,
"clickhouse_max_insert_threads": 1,
"clickhouse_max_threads": 8,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_parallel_distributed_insert_select": 2,
"clickhouse_parallel_view_processing": False,
"object_storage_concurrency": 1,
"object_storage_max_file_count": 100,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_polling_interval_ms": 30000,
"object_storage_use_cluster_function": True,
"streaming_max_insert_wait_ms": 5000
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clickhouse_max_download_threads: 4,
clickhouse_max_insert_threads: 1,
clickhouse_max_threads: 8,
clickhouse_min_insert_block_size_bytes: 1073741824,
clickhouse_parallel_distributed_insert_select: 2,
clickhouse_parallel_view_processing: false,
object_storage_concurrency: 1,
object_storage_max_file_count: 100,
object_storage_max_insert_bytes: 10737418240,
object_storage_polling_interval_ms: 30000,
object_storage_use_cluster_function: true,
streaming_max_insert_wait_ms: 5000
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clickhouse_max_download_threads' => 4,
'clickhouse_max_insert_threads' => 1,
'clickhouse_max_threads' => 8,
'clickhouse_min_insert_block_size_bytes' => 1073741824,
'clickhouse_parallel_distributed_insert_select' => 2,
'clickhouse_parallel_view_processing' => false,
'object_storage_concurrency' => 1,
'object_storage_max_file_count' => 100,
'object_storage_max_insert_bytes' => 10737418240,
'object_storage_polling_interval_ms' => 30000,
'object_storage_use_cluster_function' => true,
'streaming_max_insert_wait_ms' => 5000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings"
payload := strings.NewReader("{\n \"clickhouse_max_download_threads\": 4,\n \"clickhouse_max_insert_threads\": 1,\n \"clickhouse_max_threads\": 8,\n \"clickhouse_min_insert_block_size_bytes\": 1073741824,\n \"clickhouse_parallel_distributed_insert_select\": 2,\n \"clickhouse_parallel_view_processing\": false,\n \"object_storage_concurrency\": 1,\n \"object_storage_max_file_count\": 100,\n \"object_storage_max_insert_bytes\": 10737418240,\n \"object_storage_polling_interval_ms\": 30000,\n \"object_storage_use_cluster_function\": true,\n \"streaming_max_insert_wait_ms\": 5000\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"clickhouse_max_download_threads\": 4,\n \"clickhouse_max_insert_threads\": 1,\n \"clickhouse_max_threads\": 8,\n \"clickhouse_min_insert_block_size_bytes\": 1073741824,\n \"clickhouse_parallel_distributed_insert_select\": 2,\n \"clickhouse_parallel_view_processing\": false,\n \"object_storage_concurrency\": 1,\n \"object_storage_max_file_count\": 100,\n \"object_storage_max_insert_bytes\": 10737418240,\n \"object_storage_polling_interval_ms\": 30000,\n \"object_storage_use_cluster_function\": true,\n \"streaming_max_insert_wait_ms\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clickhouse_max_download_threads\": 4,\n \"clickhouse_max_insert_threads\": 1,\n \"clickhouse_max_threads\": 8,\n \"clickhouse_min_insert_block_size_bytes\": 1073741824,\n \"clickhouse_parallel_distributed_insert_select\": 2,\n \"clickhouse_parallel_view_processing\": false,\n \"object_storage_concurrency\": 1,\n \"object_storage_max_file_count\": 100,\n \"object_storage_max_insert_bytes\": 10737418240,\n \"object_storage_polling_interval_ms\": 30000,\n \"object_storage_use_cluster_function\": true,\n \"streaming_max_insert_wait_ms\": 5000\n}"
response = http.request(request)
puts response.read_body{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"clickhouse_max_download_threads": 4,
"clickhouse_max_insert_threads": 1,
"clickhouse_max_threads": 8,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_parallel_distributed_insert_select": 2,
"clickhouse_parallel_view_processing": false,
"object_storage_concurrency": 1,
"object_storage_max_file_count": 100,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_polling_interval_ms": 30000,
"object_storage_use_cluster_function": true,
"streaming_max_insert_wait_ms": 5000
},
"status": 200
}{
"error": "<string>",
"status": 400
}