title_wip

[Edit this page](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/integrations/data-ingestion/etl-tools/bladepipe-and-clickhouse.md)

Partner Integration

[BladePipe](https://www.bladepipe.com/) is a real-time end-to-end data integration tool with sub-second latency, boosting seamless data flow across platforms.

ClickHouse is one of BladePipe's pre-built connectors, allowing users to integrate data from various sources into ClickHouse automatically. This page will show how to load data into ClickHouse in real time step by step.

## Supported sources[​](#supported-sources "Direct link to Supported sources")

Currently BladePipe supports for data integration to ClickHouse from the following sources:

- MySQL/MariaDB/AuroraMySQL
- Oracle
- PostgreSQL/AuroraPostgreSQL
- MongoDB
- Kafka
- PolarDB-MySQL
- OceanBase
- TiDB

More sources are to be supported.

Download and run BladePipe

## Download and run BladePipe[​](#1-run-bladepipe "Direct link to Download and run BladePipe")

1. Log in to [BladePipe Cloud](https://www.bladepipe.com/).
2. Follow the instructions in [Install Worker (Docker)](https://doc.bladepipe.com/productOP/byoc/installation/install_worker_docker) or [Install Worker (Binary)](https://doc.bladepipe.com/productOP/byoc/installation/install_worker_binary) to download and install a BladePipe Worker.

Note

Alternatively, you can download and deploy [BladePipe Enterprise](https://doc.bladepipe.com/productOP/onPremise/installation/install_all_in_one_binary).

Add ClickHouse as a target

## Add ClickHouse as a target[​](#2-add-clickhouse-as-a-target "Direct link to Add ClickHouse as a target")

Note

1. BladePipe supports ClickHouse version `20.12.3.3` or above.
2. To use ClickHouse as a target, make sure that the user has SELECT, INSERT and common DDL permissions.

1. In BladePipe, click "DataSource" > "Add DataSource".
2. Select `ClickHouse`, and fill out the settings by providing your ClickHouse host and port, username and password, and click "Test Connection".
3. Click "Add DataSource" at the bottom, and a ClickHouse instance is added.

Add MySQL as a source

## Add MySQL as a source[​](#3-add-mysql-as-a-source "Direct link to Add MySQL as a source")

In this tutorial, we use a MySQL instance as the source, and explain the process of loading MySQL data to ClickHouse.

Note

To use MySQL as a source, make sure that the user has the [required permissions](https://doc.bladepipe.com/dataMigrationAndSync/datasource_func/MySQL/privs_for_mysql).

1. In BladePipe, click "DataSource" > "Add DataSource".
2. Select `MySQL`, and fill out the settings by providing your MySQL host and port, username and password, and click "Test Connection".
3. Click "Add DataSource" at the bottom, and a MySQL instance is added.

Create a pipeline

## Create a pipeline[​](#4-create-a-pipeline "Direct link to Create a pipeline")

1. In BladePipe, click "DataJob" > "Create DataJob".
2. Select the added MySQL and ClickHouse instances and click "Test Connection" to ensure BladePipe is connected to the instances. Then, select the databases to be moved.
3. Select "Incremental" for DataJob Type, together with the "Full Data" option.
4. Select the tables to be replicated.
5. Select the columns to be replicated.
6. Confirm the DataJob creation, and the DataJob runs automatically.

Verify the data

## Verify the data[​](#5-verify-the-data "Direct link to Verify the data")

1. Stop data write in MySQL instance and wait for ClickHouse to merge data.

Note

Due to the unpredictable timing of ClickHouse's automatic merging, you can manually trigger a merging by running the `OPTIMIZE TABLE xxx FINAL;` command. Note that there is a chance that this manual merging may not always succeed.

Alternatively, you can run the `CREATE VIEW xxx_v AS SELECT * FROM xxx FINAL;` command to create a view and perform queries on the view to ensure the data is fully merged.

2. Create a [Verification DataJob](https://doc.bladepipe.com/operation/job_manage/create_job/create_period_verification_correction_job). Once the Verification DataJob is completed, review the results to confirm that the data in ClickHouse is the same as the data in MySQL.

- [Supported sources](#supported-sources)- [Download and run BladePipe](#1-run-bladepipe)- [Add ClickHouse as a target](#2-add-clickhouse-as-a-target)- [Add MySQL as a source](#3-add-mysql-as-a-source)- [Create a pipeline](#4-create-a-pipeline)- [Verify the data](#5-verify-the-data)

Was this page helpful?