Enhancing Google Analytics Data with ClickHouse
ClickHouse's marketing team moved its Google Analytics 4 data into ClickHouse to get around GA4's sampling, slow interface, limited SQL-style flexibility and short data retention. The pipeline uses GA4's BigQuery export, which provides a daily table and a streaming intraday table. Scheduled BigQuery queries write Parquet files to GCS: the daily export runs at 6pm, and the hourly intraday export covers a window offset by 15 minutes to catch late events. ClickHouse then ingests the files with the gcs table function or S3Queue into a MergeTree schema that has materialized columns pulled from event_params. The result is fast, unsampled reporting with indefinite retention, plus external data joined via dictionaries, for under $20 a month on ClickHouse Cloud.
Related posts
- ClickHouse vs BigQuery: Using ClickHouse to Serve Real-Time Queries on Top of BigQuery Data
ClickHouse mediumAdept
ClickHouse can sit alongside BigQuery to serve sub-second, high-concurrency analytical queries for real-time applications, while BigQuery remains the warehouse for ad-hoc deep analysis. The guide maps BigQuery types to narrower ClickHouse types and codecs, and avoids Nullable columns to save storage. It bulk-exports the public Ethereum dataset to GCS as sharded gzip CSV, then loads it in parallel with s3Cluster and parallel_distributed_insert_select; the 16.5M-row blocks table imports in about 23 seconds. It also covers continuously appending new rows using BigQuery scheduled queries and Google Dataflow/Apache Beam, keyed on a time dimension.
- Why BigQuery can’t match ClickHouse Cloud for real-time analytics
ClickHouse mediumAdept
In the CostBench benchmark, ClickHouse Cloud and BigQuery ingest 113.2 billion stock quotes at a target of 1M rows/s while aggregate and drill-down queries run continuously, and ClickHouse Cloud scores 438× better end-to-end performance per dollar under BigQuery Capacity pricing and 512× under On-demand. ClickHouse wins all three components: preparation cost ($28.69 vs $243–265), normalized query cost (~$0.05 vs $4.75–24.80) and accumulated query runtime (58 seconds vs 49 minutes). The gap is traced to the fresh-data path. ClickHouse ingest nodes sort raw data and compute incremental materialized-view aggregates from the same async-insert flush. BigQuery's Storage Write API, automatic reclustering and MV refresh (minimum one-minute interval) each advance separately, which leaves more work for queries.
- How FabFunnel powers real-time marketing analytics with ClickHouse Cloud
ClickHouse mediumAdept
FabFunnel moved its marketing analytics off a normalized MySQL reporting stack, where month-long queries took 11 seconds and year-long reports crashed browsers due to client-side merges, to ClickHouse Cloud. Spend and revenue data now stream through Confluent Kafka via ClickPipes into ReplacingMergeTree tables, which replace the old delete-and-reinsert refresh cycle. Refreshable materialized views pre-aggregate into a single reporting table, and a buffer table handles real-time click data. Queries now return in under a second, and the system handled 19.2M queries reading 11.67 trillion rows in one month.
- Building a product analytics solution with ClickHouse
ClickHouse mediumAdept
ClickHouse's in-house product analytics platform, Galaxy, stores over 20 billion events (14 TB, roughly 14x compression) in a single denormalized MergeTree table keyed on created_at. A single sparse table avoids join overhead, since ClickHouse's sparse serialization makes empty columns cheap. Columns used for cohorts and filters should be top-level rather than buried in a JSON payload. Incremental materialized views speed up the few dozen recurring queries, and a custom SDK handles event capture.
- How Jump Trading uses ClickHouse with Iceberg for analytics
ClickHouse mediumAdept
Jump Trading runs a self-managed, on-prem ClickHouse cluster of tens of nodes as the system of record for petabyte-scale trading logs, ingesting hundreds of TB per day with peaks of 10M rows/sec and a sub-20-second p99, reconciled daily for zero data loss. Raw logs flow through Redpanda to sharded bare-metal ingestors, distributed tables shard the fact tables, and replicated tables hold reference data. To serve heavy batch and HPC readers without loading the real-time cluster, Jump added a Netflix-style double-write pipeline: Kafka feeds parallel consumers writing to ClickHouse and to Iceberg Parquet on object storage. ClickHouse queries both, keeping the same access control and observability, and a 20-node Iceberg setup scanned 376 billion rows in 9.6 seconds.