Move data, schema, and queries from ClickHouse to ParadeDB with minimal downtime.
You copy tables, re-create schemas, and load data so that existing ClickHouse workloads can run on ParadeDB (a Postgres-based OLAP engine) without code rewrites.
1) Export data from ClickHouse.
2) Convert schema to ParadeDB-compatible SQL.
3) Create tables in ParadeDB.
4) Import data.
5) Validate counts and queries.
6) Cut over traffic.
Use clickhouse-client with CSV format because ParadeDB’s COPY command ingests CSV efficiently:
clickhouse-client \
--query="SELECT * FROM ecommerce.Customers FORMAT CSV" \
--compress 1 \
> Customers.csv.gz
Repeat for Orders, Products, and OrderItems.
Match every column:
• UInt64 → BIGINT
• DateTime64 → TIMESTAMP
• Decimal(10,2) → NUMERIC(10,2)
• LowCardinality(String) → TEXT WITH (paradedb.low_cardinality=true)
Connect with psql and run the converted DDL:
CREATE TABLE Customers(
id BIGINT PRIMARY KEY,
name TEXT,
email TEXT,
created_at TIMESTAMP
);
-- Repeat for Orders, Products, OrderItems
ENABLE parallel COPY, then stream files:
\copy Customers FROM PROGRAM 'gunzip -c Customers.csv.gz' WITH (FORMAT csv)
Load the largest tables first to overlap network and disk usage.
Compare row counts and aggregates:
SELECT count(*) FROM Customers;
-- Expected: same as ClickHouse
SELECT SUM(total_amount) FROM Orders;
Yes.Perform an initial full load, then use incremental replication (e.g., Kafka or materialized views) to sync writes. Schedule a final short lock window to switch applications.
• Test on staging with production-sized data.
• Use NUMERIC for money fields.
• Keep ClickHouse running until ParadeDB proves stable.
• Monitor disk and autovacuum after large COPY.
You keep PostgreSQL ACID guarantees, get advanced indexing, vector search, and still enjoy columnar performance through ParadeDB extensions.
.
ParadeDB provides paradedb-migrator
, which reads ClickHouse catalogs, emits Postgres DDL, and streams data. Use it for large clusters.
You can run dual writes or use change-data-capture to keep both systems updated, but it adds complexity.
You only need a role with CREATE and COPY privileges in the target schema.