ClickPipe 설정 업데이트
이 endpoint는 베타입니다. API 계약은 안정적이며, 앞으로 호환되지 않는 변경 사항은 없을 것으로 예상됩니다.
지정된 ClickPipe의 고급 설정을 업데이트합니다. 값은 문자열, 숫자 또는 불리언일 수 있으며, key-value 쌍으로 전송하십시오.
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
경로 매개변수
서비스를 소유한 organization의 ID입니다.
ClickPipe를 소유한 서비스의 ID입니다.
설정을 업데이트할 ClickPipe의 ID입니다.
본문
최대 다운로드 스레드 수입니다. 최대 동시 다운로드 스레드 수입니다.
0 <= x <= 324
최대 삽입 스레드 수입니다. 최대 동시 삽입 스레드 수입니다.
0 <= x <= 161
최대 스레드 수입니다. 파일 처리에 사용할 최대 동시 스레드 수입니다.
0 <= x <= 648
최소 삽입 블록 크기(바이트)입니다. 삽입용 데이터 블록의 최소 크기입니다(바이트 단위).
0 <= x <= 107374182401073741824
병렬 분산 삽입 선택입니다. 병렬 분산 삽입 선택 설정입니다.
0 <= x <= 22
병렬 VIEW 처리입니다. attached 상태인 VIEW에 순차적으로 푸시하는 대신 동시에 푸시하도록 활성화할지 여부입니다.
false
객체 스토리지 동시성입니다. 파일 처리를 위한 최대 동시 스레드 수입니다.
1 <= x <= 351
최대 파일 수입니다. 단일 삽입 배치에서 처리할 최대 파일 수입니다.
1 <= x <= 10000100
최대 삽입 바이트 수입니다. 단일 삽입 배치에서 처리할 바이트 수입니다.
10485760 <= x <= 5368709120010737418240
객체 스토리지 폴링 인터벌입니다. 새 객체 스토리지 데이터를 연속 수집할 때 조회하는 갱신 인터벌을 구성합니다.
100 <= x <= 360000030000
cluster function 사용입니다. 분산 처리에 ClickHouse cluster function을 사용할지 여부입니다.
true
Streaming 최대 삽입 대기 시간입니다. 데이터를 ClickHouse에 삽입하기 전까지의 최대 대기 시간을 구성합니다.
500 <= x <= 600005000
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
}