> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickHouse Cloud: Clickhouse Click Pipe Create

> Create ClickPipe. ClickHouse Cloud Clickhouse Click Pipe Create reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline.

Create ClickPipe.

<Info>
  Tool ID: `clickhouse_click_pipe_create`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'clickhouse_click_pipe_create',
  {
    "organizationId": "123e4567-e89b-42d3-a456-426614174000",
    "serviceId": "123e4567-e89b-42d3-a456-426614174000"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute clickhouse_click_pipe_create --input '{
  "organizationId": "123e4567-e89b-42d3-a456-426614174000",
  "serviceId": "123e4567-e89b-42d3-a456-426614174000"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "status": 123,
    "requestId": "123e4567-e89b-42d3-a456-426614174000",
    "result": {
      "id": "123e4567-e89b-42d3-a456-426614174000",
      "serviceId": "123e4567-e89b-42d3-a456-426614174000",
      "name": "Example"
    }
  }
}
```

Use `deepline tools get clickhouse_click_pipe_create --json` for the latest machine-readable contract.

## Input reference

Create a new ClickPipe.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.organizationId` | `string` | Yes | — | ID of the organization that owns the service. Format: `uuid`. |
| `payload.serviceId` | `string` | Yes | — | ID of the service to create the ClickPipe for. Format: `uuid`. |
| `payload.name` | `string` | No | — | Name of the ClickPipe. |
| `payload.source` | `object` | No | — | — |
| `payload.destination` | `object` | No | — | — |
| `payload.fieldMappings` | `array` | No | — | Field mappings of the ClickPipe. Note that all destination columns must be included in the mappings. |
| `payload.scaling` | `object` | No | — | — |
| `payload.settings` | `object` | No | — | — |

<Info>
  This input schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get clickhouse_click_pipe_create --json`.
</Info>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.status` | `number` | No | — | HTTP status code. |
| `result.data.requestId` | `string` | No | — | Unique id assigned to every request. UUIDv4 Format: `uuid`. |
| `result.data.result` | `object` | No | — | — |
| `result.data.result.id` | `string` | No | — | Unique ClickPipe ID. Format: `uuid`. |
| `result.data.result.serviceId` | `string` | No | — | ID of the service this ClickPipe belongs to. Format: `uuid`. |
| `result.data.result.name` | `string` | No | — | Name of the ClickPipe. Minimum length: 1. Maximum length: 255. |
| `result.data.result.state` | `"Unknown" \| "Provisioning" \| "Running" \| "Stopping" \| "Stopped" \| "Failed" \| "Completed" \| "InternalError" \| "Setup" \| "Snapshot" \| "Paused" \| "Pausing" \| "Modifying" \| "Resync"` | No | — | Current lifecycle state of the ClickPipe. For database pipes: "Provisioning" (initial setup), "Setup" (configuring replication), "Snapshot" (initial data load), "Running" (actively replicating), "Pausing" (transitioning to paused state), "Paused" (temporarily paused), "Modifying" (applying configuration updates), "Resync" (swapping resync tables with original tables), "Failed" (error occurred), "Unknown". For streaming/object storage pipes (Kafka, Kinesis, S3): "Unknown" (initial state), See the live schema for the complete constraint. |
| `result.data.result.scaling` | `object` | No | — | — |
| `result.data.result.scaling.replicas` | `integer` | No | — | Desired number of replicas. Only for scalable pipes. Minimum: 1. Maximum: 40. |
| `result.data.result.scaling.concurrency` | `integer` | No | — | Desired number of concurrency. Only for S3 pipes. If set to 0, concurrency is auto-scaled based on the cluster memory. |
| `result.data.result.scaling.replicaCpuMillicores` | `integer` | No | — | CPU in millicores for each replica. Only for streaming pipes. Minimum: 125. Maximum: 2000. |
| `result.data.result.scaling.replicaMemoryGb` | `number` | No | — | Memory in GB for each replica. Only for streaming pipes. Minimum: 0.5. Maximum: 8. |
| `result.data.result.source` | `object` | No | — | — |
| `result.data.result.source.kafka` | `record` | No | — | — |
| `result.data.result.source.objectStorage` | `record` | No | — | — |
| `result.data.result.source.kinesis` | `record` | No | — | — |
| `result.data.result.source.pubsub` | `record` | No | — | — |
| `result.data.result.source.postgres` | `record` | No | — | — |
| `result.data.result.source.mysql` | `record` | No | — | — |
| `result.data.result.source.bigquery` | `record` | No | — | — |
| `result.data.result.source.mongodb` | `record` | No | — | — |
| `result.data.result.destination` | `object` | No | — | — |
| `result.data.result.destination.database` | `string` | No | — | Destination database. |
| `result.data.result.destination.table` | `string` | No | — | Destination table. Required field for all pipe types except database pipes (Postgres, MySQL, BigQuery). |
| `result.data.result.destination.managedTable` | `boolean` | No | — | Is the table managed by ClickPipes? Required field for all pipe types except database pipes (Postgres, MySQL, BigQuery). |
| `result.data.result.destination.tableDefinition` | `object` | No | — | — |
| `result.data.result.destination.tableDefinition.engine` | `object` | No | — | — |
| `result.data.result.destination.tableDefinition.engine.type` | `"MergeTree" \| "ReplacingMergeTree" \| "SummingMergeTree" \| "Null"` | No | — | Engine type of the destination table. Allowed: `MergeTree`, `ReplacingMergeTree`, `SummingMergeTree`, `Null`. |
| `result.data.result.destination.tableDefinition.engine.versionColumnId` | `string \| null` | No | — | Column name to use as version for ReplacingMergeTree engine. |
| `result.data.result.destination.tableDefinition.engine.columnIds` | `array` | No | — | Column names to sum for SummingMergeTree engine. |
| `result.data.result.destination.tableDefinition.sortingKey` | `array` | No | — | Sorting key of the destination table. List of columns. |
| `result.data.result.destination.tableDefinition.partitionBy` | `string` | No | — | Partition key SQL expression. |
| `result.data.result.destination.tableDefinition.primaryKey` | `string` | No | — | Primary key of SQL expression. |
| `result.data.result.destination.columns` | `array` | No | — | Columns of the destination table. Required field for all pipe types except database pipes (Postgres, MySQL, BigQuery). |
| `result.data.result.destination.columns[].name` | `string` | No | — | Name of the column. |
| `result.data.result.destination.columns[].type` | `string` | No | — | Type of the column. |
| `result.data.result.fieldMappings` | `array` | No | — | Field mappings of the ClickPipe. Note that all destination columns must be included in the mappings. |
| `result.data.result.fieldMappings[].sourceField` | `string` | No | — | Source field name. |
| `result.data.result.fieldMappings[].destinationField` | `string` | No | — | Destination field name. |
| `result.data.result.settings` | `object` | No | — | — |
| `result.data.result.settings.streaming_max_insert_wait_ms` | `integer \| null` | No | — | Streaming max insert wait time. Configures the max wait period before inserting data into the ClickHouse. Minimum: 500. Maximum: 60000. |
| `result.data.result.settings.object_storage_concurrency` | `integer \| null` | No | — | Object storage concurrency. Number of concurrent file processing threads Minimum: 1. Maximum: 35. |
| `result.data.result.settings.object_storage_polling_interval_ms` | `integer \| null` | No | — | Object storage polling interval. Configures the refresh interval for querying continuous ingest for new object storage data Minimum: 100. Maximum: 3600000. |
| `result.data.result.settings.object_storage_max_insert_bytes` | `integer \| null` | No | — | Max insert bytes. Number of bytes to process in a single insert batch Minimum: 10485760. Maximum: 53687091200. |
| `result.data.result.settings.object_storage_max_file_count` | `integer \| null` | No | — | Max file count. Maximum number of files to process in a single insert batch Minimum: 1. Maximum: 10000. |
| `result.data.result.settings.clickhouse_max_threads` | `integer \| null` | No | — | Max threads. Maximum number of concurrent threads for file processing Minimum: 0. Maximum: 64. |
| `result.data.result.settings.clickhouse_max_insert_threads` | `integer \| null` | No | — | Max insert threads. Maximum number of concurrent insert threads Minimum: 0. Maximum: 16. |
| `result.data.result.settings.clickhouse_min_insert_block_size_bytes` | `integer \| null` | No | — | Min insert block size bytes. Minimum size of data block for insert (in bytes) Minimum: 0. Maximum: 10737418240. |
| `result.data.result.settings.clickhouse_max_download_threads` | `integer \| null` | No | — | Max download threads. Maximum number of concurrent download threads Minimum: 0. Maximum: 32. |

The table shows the first 50 fields. Expand the raw schema below for every field.

<Info>
  This output schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get clickhouse_click_pipe_create --json`.
</Info>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [ClickHouse Cloud provider guide](/docs/providers/clickhouse/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.