Kafka to ClickHouse
BladePipe supports data replication from Kafka to ClickHouse. View supported migration, sync, verification, and connector capabilities.
| Function | Description |
|---|---|
Incremental Data Sync | Allow subscribing to messages from the source Topic and transforming them into DML operations, namely, INSERT, UPDATE, DELETE. |
Subscription Modification | Add, delete, or modify the subscribed topics. For more information, see Modify Subscription. |
Position Resetting | Reset positions by timestamp to consume the data in a past period again. |
Advanced Functions
| Function | Description |
|---|---|
Message Format | The following message formats are supported. See Message Format.
|
Write in Append Mode | INSERT and UPDATE statements are written in batches in append mode, and DELETE statements are executed individually through ALTER statements. |
Scheduled Table Optimization | By setting the parameter autoOptimizeThresholdSec, the tables are optimized regularly. |
Limits
| Limit | Description |
|---|---|
Creating Tables in the Target in Advance | Only support automatic Topic creation for messages. |
Raw Message Format | Only support raw message replication from Kafka to Kafka, and Raw Message Format needs to be selected at both the Source and the Target. |
Special Operation | Too many DELETE operations (>50 records/second) significantly affect data synchronization performance. |
Target Table Engine | Only the following table engines and corresponding source table types are supported:
|
Prerequisites
| Prerequisite | Description |
|---|---|
Port Preparation | Allow the migration and sync node (Worker) to connect to the Kafka ports. |
Parameters
| Parameter | Description |
|---|---|
schemaFormat | MQ Message format. For more information, see Message Format. |
consumerGroupId | Kafka consumer group ID. |
consumeParallel | Degree of consuming Kafka topics in parallel. |
sessionTimeoutMs | Kafka session timeout in milliseconds. |
maxPollRecords | Maximum number of messages fetched in one poll from Kafka. |
dbHeartbeatIntervalSec | Interval for initiating heartbeat on the source database. |
dbHeartbeatToleranceStep | The threshold of gap between the latest offset and the current offset. If the actual gap is bigger than the threshold, BladePipe won‘t send heartbeat message. |
customClientProps | Custom properties passed to the Kafka client in JSON format. The key is the parameter name and the value is the parameter value. This setting takes the highest priority. For example: AWS IAM Access Control |
Tips: To modify the general parameters, see General Parameters and Functions.
Prerequisites
| Prerequisite | Description |
|---|---|
Permissions for Account | SELECT, INSERT and common DDL permissions. |
Port Preparation | Allow the migration and sync node (Worker) to connect to the ClickHouse port (e.g., 8123). |
Parameters
| Parameter | Description |
|---|---|
multiReplica | Whether there are multiple replicas in a cluster. |
clusterName | Cluster name. When multiReplica is true, the ON CLUSTER clusterName clause is automatically added to DDL/DML. |
ckTableEngine | The following table engines are currently supported:
|
autoOptimizeThresholdSec | Interval of scheduled table optimization (optimize table final). If the value <=0, it means the feature is disabled. |
enableTimeRangeClamping | Whether to enable time range clamping. Forces date and time values to be constrained within the valid ClickHouse JDBC range. Values outside this range will be clamped to the minimum or maximum values. Disabled by default (false). Ranges after clamping(UTC):
|
Tips: To modify the general parameters, see General Parameters and Functions.