ClickPipes
Create ClickPipe
Changed onCreate a new ClickPipe.
post/v1/organizations/{organizationId}/services/{serviceId}/clickpipes
Request
- Base URLhttps://api.clickhouse.cloud
- AuthHTTP basic
Path parameters
organizationId, string uuid required
ID of the organization that owns the service.
serviceId, string uuid required
ID of the service to create the ClickPipe for.
Request body
Click Pipe Post Request required
name, string required
Name of the ClickPipe.
source, Click Pipe Post Source required
destination, Click Pipe Mutate Destination required
fieldMappings, Click Pipe Field Mapping[]
Field mappings of the ClickPipe. Note that all destination columns must be included in the mappings.
scaling, Click Pipe Scaling
settings, Click Pipe Settings Put Request
startPaused, boolean
Create the ClickPipe in the Stopped state instead of starting ingestion immediately. Start it later with the state endpoint. Not supported for database ClickPipes.
Example request
{
"source": {
"kafka": {
"topics": "topic1,topic2",
"consumerGroup": "my-clickpipe-consumer-group",
"iamRole": "arn:aws:iam::123456789012:role/MyRole",
"offset": {
"timestamp": "2021-01-01T00:00"
},
"schemaRegistry": {
"url": "https://psrc-aa00.us-east-2.aws.confluent.cloud/schemas/ids/100004",
"authentication": "PLAIN",
"tokenUrl": "https://auth.example.com/oauth2/v1/token",
"scope": "schema_registry",
"audience": "https://schema-registry.example.com"
},
"tombstoneMode": "soft_delete",
"credentials": {
"username": "postgres_user",
"password": "your_secure_password"
},
"protobufSchema": "c3ludGF4ID0gInByb3RvMyI7IG1lc3NhZ2UgRXZlbnQge30="
},
"objectStorage": {
"url": "https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/**.ndjson.gz",
"delimiter": ",",
"skipFirstLines": 1,
"compression": "auto",
"queueUrl": "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue",
"startAfter": "events/2026-06-01/",
"authentication": "IAM_ROLE",
"iamRole": "arn:aws:iam::123456789012:role/MyRole",
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net",
"path": "data/logs/*.json",
"azureContainerName": "mycontainer"
},
"kinesis": {
"streamName": "my-stream",
"region": "us-east-1",
"timestamp": 1615766400,
"iamRole": "arn:aws:iam::123456789012:role/MyRole",
"schemaRegistry": {
"glueRegion": "us-east-1",
"glueRegistryName": "my-registry",
"glueRoleArn": "arn:aws:iam::123456789012:role/MyGlueRegistryRole"
},
"protobufSchema": "c3ludGF4ID0gInByb3RvMyI7IG1lc3NhZ2UgRXZlbnQge30="
},
"pubsub": {
"format": "JSONEachRow",
"projectId": "my-gcp-project",
"topic": "my-topic",
"authentication": "SERVICE_ACCOUNT",
"seekType": "earliest",
"seekTimestamp": "2026-04-10T12:00:00Z"
},
"postgres": {
"credentials": {
"username": "postgres_user",
"password": "your_secure_password"
},
"host": "my-postgres-server.example.com",
"port": 5432,
"database": "production_db",
"settings": {
"syncIntervalSeconds": 60,
"pullBatchSize": 1000,
"publicationName": "clickpipes_publication",
"replicationMode": "cdc",
"replicationSlotName": "clickpipes_slot",
"initialLoadParallelism": 4,
"snapshotNumRowsPerPartition": 100000,
"snapshotNumberOfParallelTables": 1
},
"authentication": "IAM_ROLE",
"iamRole": "arn:aws:iam::123456789012:role/MyApplicationRole",
"tlsHost": "my-postgres-server.example.com",
"caCertificate": "-----BEGIN CERTIFICATE-----\n...",
"tableMappings": [
{
"sourceSchemaName": "public",
"sourceTable": "users",
"targetTable": "public_users",
"excludedColumns": [
"internal_id",
"temp_data"
],
"sortingKeys": [
"created_at_date",
"event_id"
],
"tableEngine": "ReplacingMergeTree",
"partitionKey": "id",
"partitionByExpr": "toYYYYMM(created_at)"
}
]
},
"mysql": {
"credentials": {
"username": "postgres_user",
"password": "your_secure_password"
},
"host": "my-mysql-server.example.com",
"port": 3306,
"settings": {
"syncIntervalSeconds": 60,
"pullBatchSize": 1000,
"replicationMode": "cdc",
"replicationMechanism": "GTID",
"initialLoadParallelism": 4,
"snapshotNumRowsPerPartition": 100000,
"snapshotNumberOfParallelTables": 1
},
"authentication": "basic",
"iamRole": "arn:aws:iam::123456789012:role/MyApplicationRole",
"tlsHost": "my-mysql-server.example.com",
"caCertificate": "-----BEGIN CERTIFICATE-----\n...",
"serverId": 4242,
"tableMappings": [
{
"sourceSchemaName": "my_database",
"sourceTable": "users",
"targetTable": "my_database_users",
"excludedColumns": [
"internal_id",
"temp_data"
],
"sortingKeys": [
"created_at_date",
"event_id"
],
"tableEngine": "ReplacingMergeTree",
"partitionKey": "id",
"partitionByExpr": "toYYYYMM(created_at)"
}
]
},
"bigquery": {
"settings": {
"replicationMode": "cdc",
"replicationMethod": "query_based",
"syncIntervalSeconds": 60,
"queryCdcPullSyncParallelism": 4,
"syncDelaySeconds": 60,
"pullWindowSizeSeconds": 86400,
"syncCron": "0 * * * *"
},
"tableMappings": [
{
"eventsFunction": "appends"
}
],
"projectId": "my-gcp-project"
},
"mongodb": {
"credentials": {
"username": "postgres_user",
"password": "your_secure_password"
},
"uri": "mongodb+srv://cluster0.example.mongodb.net/mydb",
"readPreference": "secondaryPreferred",
"tlsHost": "cluster0.example.mongodb.net",
"caCertificate": "-----BEGIN CERTIFICATE-----\n...",
"settings": {
"syncIntervalSeconds": 60,
"pullBatchSize": 100000,
"replicationMode": "cdc",
"initialLoadParallelism": 4,
"snapshotNumRowsPerPartition": 100000,
"snapshotNumberOfParallelTables": 1,
"useJsonNativeFormat": true
},
"tableMappings": [
{
"sourceDatabaseName": "mydb",
"sourceCollection": "users",
"targetTable": "mydb_users",
"tableEngine": "ReplacingMergeTree",
"structuredIngestion": {
"enabled": true,
"columns": [
{
"name": "amount",
"type": "Float64"
}
],
"excludedColumns": [
"internal_notes"
],
"sortingKeys": [
"_id",
"created_at"
],
"partitionByExpr": "toYYYYMM(created_at)"
}
}
]
}
},
"destination": {
"tableDefinition": {
"ttl": "toDateTime(event_time) + INTERVAL 30 DAY"
}
},
"settings": {
"streaming_max_insert_wait_ms": 5000,
"object_storage_concurrency": 1,
"object_storage_polling_interval_ms": 30000,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_max_file_count": 100,
"object_storage_max_file_size": 10737418240,
"clickhouse_max_threads": 8,
"clickhouse_max_insert_threads": 1,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_max_download_threads": 4,
"clickhouse_parallel_distributed_insert_select": 2,
"object_storage_use_cluster_function": true
}
}Response
Successful response
object required
status, number
HTTP status code.
requestId, string uuid
Unique id assigned to every request. UUIDv4
result, Click Pipe
Example response
{
"status": 200,
"result": {
"name": "my_postgres_pipe",
"state": "Running",
"source": {
"kafka": {
"topics": "topic1,topic2",
"consumerGroup": "my-clickpipe-consumer-group",
"iamRole": "arn:aws:iam::123456789012:role/MyRole",
"offset": {
"timestamp": "2021-01-01T00:00"
},
"schemaRegistry": {
"url": "https://psrc-aa00.us-east-2.aws.confluent.cloud/schemas/ids/100004",
"authentication": "PLAIN",
"tokenUrl": "https://auth.example.com/oauth2/v1/token",
"scope": "schema_registry",
"audience": "https://schema-registry.example.com"
},
"tombstoneMode": "soft_delete"
},
"objectStorage": {
"url": "https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/**.ndjson.gz",
"delimiter": ",",
"skipFirstLines": 1,
"compression": "auto",
"queueUrl": "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue",
"startAfter": "events/2026-06-01/",
"authentication": "IAM_ROLE",
"iamRole": "arn:aws:iam::123456789012:role/MyRole",
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net",
"path": "data/logs/*.json",
"azureContainerName": "mycontainer"
},
"kinesis": {
"streamName": "my-stream",
"region": "us-east-1",
"timestamp": 1615766400,
"iamRole": "arn:aws:iam::123456789012:role/MyRole",
"schemaRegistry": {
"glueRegion": "us-east-1",
"glueRegistryName": "my-registry",
"glueRoleArn": "arn:aws:iam::123456789012:role/MyGlueRegistryRole"
}
},
"pubsub": {
"format": "JSONEachRow",
"projectId": "my-gcp-project",
"topic": "my-topic",
"authentication": "SERVICE_ACCOUNT",
"seekType": "earliest",
"seekTimestamp": "2026-04-10T12:00:00Z"
},
"postgres": {
"host": "my-postgres-server.example.com",
"port": 5432,
"database": "production_db",
"authentication": "IAM_ROLE",
"iamRole": "arn:aws:iam::123456789012:role/MyApplicationRole",
"tlsHost": "my-postgres-server.example.com",
"caCertificate": "-----BEGIN CERTIFICATE-----\n...",
"settings": {
"syncIntervalSeconds": 60,
"pullBatchSize": 1000,
"publicationName": "clickpipes_publication",
"replicationMode": "cdc",
"replicationSlotName": "clickpipes_slot",
"initialLoadParallelism": 4,
"snapshotNumRowsPerPartition": 100000,
"snapshotNumberOfParallelTables": 1
},
"tableMappings": [
{
"sourceSchemaName": "public",
"sourceTable": "users",
"targetTable": "public_users",
"excludedColumns": [
"internal_id",
"temp_data"
],
"sortingKeys": [
"created_at_date",
"event_id"
],
"tableEngine": "ReplacingMergeTree",
"partitionKey": "id",
"partitionByExpr": "toYYYYMM(created_at)"
}
]
},
"mysql": {
"host": "my-mysql-server.example.com",
"port": 3306,
"authentication": "basic",
"iamRole": "arn:aws:iam::123456789012:role/MyApplicationRole",
"tlsHost": "my-mysql-server.example.com",
"caCertificate": "-----BEGIN CERTIFICATE-----\n...",
"serverId": 4242,
"settings": {
"syncIntervalSeconds": 60,
"pullBatchSize": 1000,
"replicationMode": "cdc",
"replicationMechanism": "GTID",
"initialLoadParallelism": 4,
"snapshotNumRowsPerPartition": 100000,
"snapshotNumberOfParallelTables": 1
},
"tableMappings": [
{
"sourceSchemaName": "my_database",
"sourceTable": "users",
"targetTable": "my_database_users",
"excludedColumns": [
"internal_id",
"temp_data"
],
"sortingKeys": [
"created_at_date",
"event_id"
],
"tableEngine": "ReplacingMergeTree",
"partitionKey": "id",
"partitionByExpr": "toYYYYMM(created_at)"
}
]
},
"bigquery": {
"settings": {
"replicationMode": "cdc",
"replicationMethod": "query_based",
"syncIntervalSeconds": 60,
"queryCdcPullSyncParallelism": 4,
"syncDelaySeconds": 60,
"pullWindowSizeSeconds": 86400,
"syncCron": "0 * * * *"
},
"tableMappings": [
{
"eventsFunction": "appends"
}
],
"projectId": "my-gcp-project"
},
"mongodb": {
"uri": "mongodb+srv://cluster0.example.mongodb.net/mydb",
"readPreference": "secondaryPreferred",
"tlsHost": "cluster0.example.mongodb.net",
"caCertificate": "-----BEGIN CERTIFICATE-----\n...",
"settings": {
"syncIntervalSeconds": 60,
"pullBatchSize": 100000,
"replicationMode": "cdc",
"initialLoadParallelism": 4,
"snapshotNumRowsPerPartition": 100000,
"snapshotNumberOfParallelTables": 1,
"useJsonNativeFormat": true
},
"tableMappings": [
{
"sourceDatabaseName": "mydb",
"sourceCollection": "users",
"targetTable": "mydb_users",
"tableEngine": "ReplacingMergeTree",
"structuredIngestion": {
"enabled": true,
"columns": [
{
"name": "amount",
"type": "Float64"
}
],
"excludedColumns": [
"internal_notes"
],
"sortingKeys": [
"_id",
"created_at"
],
"partitionByExpr": "toYYYYMM(created_at)"
}
}
]
}
},
"destination": {
"tableDefinition": {
"ttl": "toDateTime(event_time) + INTERVAL 30 DAY"
}
},
"settings": {
"streaming_max_insert_wait_ms": 5000,
"object_storage_concurrency": 1,
"object_storage_polling_interval_ms": 30000,
"object_storage_max_insert_bytes": 10737418240,
"object_storage_max_file_count": 100,
"object_storage_max_file_size": 10737418240,
"clickhouse_max_threads": 8,
"clickhouse_max_insert_threads": 1,
"clickhouse_min_insert_block_size_bytes": 1073741824,
"clickhouse_max_download_threads": 4,
"clickhouse_parallel_distributed_insert_select": 2,
"object_storage_use_cluster_function": true
},
"createdAt": "2026-03-26T20:51:16Z",
"updatedAt": "2026-03-26T21:04:52Z"
}
}Changes
- info
the security scope
sql-console:database:accesswas added to the endpoint's security schemebasicAuth
- info
- warning
removed the request property
scaling/concurrency - warning
removed the optional property
result/scaling/concurrencyfrom the response with the status
3 more changes in this revision
- warning