Skip to content

Services / ClickHouse

ClickHouse Analytics and Migration

We build real-time analytics on ClickHouse and migrate workloads to it from Snowflake, BigQuery, Redshift and PostgreSQL. Our ClickHouse team includes certified professionals, and we work on ClickHouse Cloud as well as on clusters you operate.

Typical duration
Six to sixteen weeks, depending on the number of workloads moved and the sources involved
Team
A lead architect and one or two data engineers, drawn from a ClickHouse team that includes certified professionals
Starts with
A workload assessment of one to two weeks, ending with a design and a costed plan. You can stop there, or build it with us or with your own team.

The usual situation

The analytics page in our product takes twenty seconds to load, and the warehouse bill goes up every time we add a chart to it.

General-purpose warehouses are built for governed reporting across the business, and most teams should keep them for that. They are a poor fit for workloads that run thousands of small queries a minute against a fast-growing event table, or for dashboards that must show the last few seconds of activity. Teams in that position usually try larger warehouses and more caching first, which raises the cost without bringing latency down far enough.

Common uses

  1. 01

    Website and API traffic analytics

    Every request is counted and charted within seconds, by country, status code, path or customer. Raw events stream in from Kafka, and materialized views roll them up into SummingMergeTree and AggregatingMergeTree tables, so dashboards read compact per-minute aggregates instead of raw logs.

    In production. Cloudflare runs its HTTP analytics on ClickHouse. Its 2018 write-up describes an average of 6 million requests per second, with peaks of 8 million, fed from Kafka. Cloudflare engineering blog

  2. 02

    Log analytics and observability

    Application logs change shape every time a service changes, which breaks fixed schemas. We keep the common fields as columns and the rest as key-value data, add bloom-filter skipping indexes for lookups by request or trace ID, and move older data to object storage with TTL rules.

    In production. Uber replaced its ELK stack with ClickHouse for logging. Its 2021 post reports millions of logs per second from thousands of services, at under half the hardware cost of ELK. Uber engineering blog

  3. 03

    Product and user-behavior analytics

    Funnels, retention and cohort reports over large event tables, returned while the person who asked is still looking at the screen. Events are sorted by project, event name and time, and ClickHouse's windowFunnel, retention and uniq functions compute the reports directly in SQL.

    In production. PostHog, the open-source product analytics platform, says ClickHouse powers all of its analytics features. PostHog handbook

  4. 04

    LLM and AI application tracing

    Every model call becomes a trace with prompts, token counts, latency and cost, and teams filter and aggregate those traces across millions of rows. ClickHouse absorbs the write rate, and ReplacingMergeTree tables let a trace be updated as later spans arrive.

    In production. Langfuse moved its traces, observations and scores from Postgres to ClickHouse in version 3 (December 2024), after Postgres slowed down at millions of rows of tracing data. Langfuse changelog

  5. 05

    Live dashboards on operational databases

    Orders, payments or bookings appear on a dashboard seconds after they are written to MySQL or PostgreSQL, with little extra load on the production database. Change data capture streams every insert, update and delete into ReplacingMergeTree tables, and a current-state view feeds the dashboard.

  6. 06

    Customer-facing analytics in your product

    Usage dashboards and reports that your own customers open inside your application, where many small queries arrive at once and each has to return quickly. The tenant ID goes first in the sort key so each query reads only that customer's data, materialized views pre-aggregate the common reports, and row policies keep tenants apart.

Moving from your current platform

Most migrations move specific workloads, usually the high-volume, low-latency ones, and leave governed reporting where it already runs. History moves in bulk through object storage. After that, an incremental feed keeps ClickHouse current until cutover, and only the export method and the type mapping change from one source to the next.

  • From Snowflake

    Tables are exported with COPY INTO an external stage as Parquet files of around 150 MB, then loaded with INSERT INTO ... SELECT from ClickHouse's s3, gcs or azureBlobStorage table functions. VARIANT and OBJECT columns arrive as JSON strings and are converted to typed columns on insert. ClickHouse's guide reports about 30 minutes to export roughly 5 TB to S3 from a 2X-Large warehouse in the same region.

    ClickHouse migration guide

  • From BigQuery

    Tables are exported to Google Cloud Storage as Parquet or Avro, in files of up to 1 GB, and loaded with s3Cluster so every node of a ClickHouse Cloud service reads in parallel. ClickHouse's guide notes that Google allows up to 50 TB of exports a day at no charge. ClickPipes also has a BigQuery connector, in private preview, for the bulk load. Changes after that come from scheduled exports filtered on an updated-at column.

    ClickHouse migration guide

  • From Redshift

    UNLOAD writes each table to S3 as Parquet, and ClickHouse reads the files in parallel with the s3 table function, inferring the schema from them where that helps. ClickHouse's PostgreSQL table function cannot connect to Redshift, so a direct pull goes through the JDBC Bridge, and an ETL tool such as Airbyte is the third option.

    ClickHouse migration guide

  • From PostgreSQL or MySQL

    When reporting runs on a read replica that can no longer keep up, ClickPipes or a self-managed CDC pipeline copies the tables into ClickHouse and keeps them in sync, so dashboards can move across one table at a time.

The sequence of work

ClickHouse is an open-source, column-oriented database, and it usually sits beside the existing warehouse. Most of the design effort goes into table layout, because the sort key and partitioning decide how much data each query has to read, and most of the migration effort goes into proving that ClickHouse returns the same answers as the source. Our ClickHouse team includes certified professionals.

  1. Inventory

    We list the queries, dashboards and APIs in scope with their latency targets, data volumes and refresh needs, and agree which workloads move and which stay on the warehouse.

  2. Schema translation

    Each table gets ClickHouse types, a sort key matched to its filters, and partitions by month or day where data is dropped by age. Columns are non-nullable unless they need to be, and because ClickHouse does not enforce primary key uniqueness, deduplication is designed into the table engine.

  3. SQL translation

    Queries and transformations are rewritten for ClickHouse SQL. Large joins are usually reworked, either by denormalizing at load time or by turning small lookup tables into dictionaries.

  4. Historical backfill

    History moves through object storage as Parquet, is loaded in parallel, and is checked against the source with row counts and aggregates for every partition.

  5. Incremental sync

    New data follows by CDC, Kafka or scheduled exports until cutover, with updates and deletes applied through ReplacingMergeTree tables.

  6. Parallel run and cutover

    Both systems answer the same queries until the results reconcile and the latency targets are met. Dashboards and APIs are then pointed at ClickHouse one workload at a time, and we hand over runbooks for monitoring, backups and upgrades.

Deliverables

  • Workload inventory with a decision for each query family: move to ClickHouse, tune in place, or leave on the warehouse
  • ClickHouse schema for every table in scope, with types, sort keys, partitions and retention documented
  • Translated queries, transformations and dictionaries, in your repository
  • Backfill and incremental sync pipelines, with a reconciliation report comparing the source and ClickHouse partition by partition
  • Query performance report comparing latency before and after for the agreed query set
  • Cutover runbook with a rollback path, and operations runbooks for monitoring, backups and upgrades

Technology

Platforms
ClickHouse Cloudself-managed ClickHouseClickHouse Keeper
Sources we migrate from
SnowflakeBigQueryAmazon RedshiftPostgreSQLMySQL
Data movement and CDC
ClickPipesKafkaDebeziumAmazon S3Google Cloud StorageAirbyte
Modeling and dashboards
dbt-clickhouseGrafanaApache SupersetMetabase

Start with a short assessment.

You can stop after the first stage if the findings do not justify going further. You keep what it produces, whichever way you decide.