> ## 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 Scaling Update

> Change the replicas, concurrency, CPU and memory of a Kafka, Kinesis or object storage ClickPipe. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Change the replicas, concurrency, CPU and memory of a Kafka, Kinesis or object storage ClickPipe.

> [!NOTE]
>
> Tool ID: `clickhouse_click_pipe_scaling_update`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

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

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute clickhouse_click_pipe_scaling_update --input '{
  "organizationId": "123e4567-e89b-42d3-a456-426614174000",
  "serviceId": "123e4567-e89b-42d3-a456-426614174000",
  "clickPipeId": "123e4567-e89b-42d3-a456-426614174000"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "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 describe clickhouse_click_pipe_scaling_update --json` for the latest machine-readable contract.

## Input reference

Change scaling settings for the specified ClickPipe. This endpoint supports Kafka, Kinesis, and object storage pipes (S3, GCS, Azure Blob). **Note:** For database ClickPipes (PostgreSQL, MySQL, MongoDB, BigQuery), use the [Update CDC ClickPipes scaling](#tag/ClickPipes/operation/clickPipeCdcScalingUpdate) endpoint instead.

| 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 that owns the ClickPipe. Format: `uuid`. |
| `payload.clickPipeId` | `string` | Yes | — | ID of the ClickPipe to update scaling settings. Format: `uuid`. |
| `payload.replicas` | `integer` | No | — | Number of replicas to scale to. Use to scale Kafka pipes. Minimum: 1. Maximum: 40. |
| `payload.concurrency` | `integer` | No | — | Number of concurrency to scale to. Use to scale S3 pipes. Minimum: 0. Maximum: 34. |
| `payload.replicaCpuMillicores` | `integer` | No | — | CPU in millicores for each replica. Use to scale streaming pipes. Minimum: 125. Maximum: 2000. |
| `payload.replicaMemoryGb` | `number` | No | — | Memory in GB for each replica. Use to scale streaming pipes. Minimum: 0.5. Maximum: 8. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Change scaling settings for the specified ClickPipe. This endpoint supports Kafka, Kinesis, and object storage pipes (S3, GCS, Azure Blob). **Note:** For database ClickPipes (PostgreSQL, MySQL, MongoDB, BigQuery), use the [Update CDC ClickPipes scaling](#tag/ClickPipes/operation/clickPipeCdcScalingUpdate) endpoint instead.",
    "properties": {
      "organizationId": {
        "type": "string",
        "description": "ID of the organization that owns the service.",
        "format": "uuid"
      },
      "serviceId": {
        "type": "string",
        "description": "ID of the service that owns the ClickPipe.",
        "format": "uuid"
      },
      "clickPipeId": {
        "type": "string",
        "description": "ID of the ClickPipe to update scaling settings.",
        "format": "uuid"
      },
      "replicas": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of replicas to scale to. Use to scale Kafka pipes.",
        "minimum": 1,
        "maximum": 40
      },
      "concurrency": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of concurrency to scale to. Use to scale S3 pipes.",
        "minimum": 0,
        "maximum": 34
      },
      "replicaCpuMillicores": {
        "type": [
          "integer",
          "null"
        ],
        "description": "CPU in millicores for each replica. Use to scale streaming pipes.",
        "minimum": 125,
        "maximum": 2000
      },
      "replicaMemoryGb": {
        "type": [
          "number",
          "null"
        ],
        "description": "Memory in GB for each replica. Use to scale streaming pipes.",
        "minimum": 0.5,
        "maximum": 8
      }
    },
    "required": [
      "organizationId",
      "serviceId",
      "clickPipeId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## 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.

> [!NOTE]
>
> This output schema is too large for an inline display. Read the complete live contract with `deepline describe clickhouse_click_pipe_scaling_update --json`.

## 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](https://deepline.com/docs/providers/clickhouse/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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