---
title: "ClickHouse vs BigQuery: Using ClickHouse to Serve Real-Time Queries on Top of BigQuery Data"
description: "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."
url: "https://swe.quest/articles/clickhouse-vs-bigquery-using-clickhouse-to-serve-real-time-queries-on-top-of-2c9e02d14f552560"
canonical: "https://clickhouse.com/blog/clickhouse-bigquery-migrating-data-for-realtime-queries"
source: "ClickHouse"
published: "2023-02-27"
difficulty: "medium"
kind: "How-to"
reading_minutes: 25
tags: ["analytics","data-pipelines","cloud","sql"]
---

# ClickHouse vs BigQuery: Using ClickHouse to Serve Real-Time Queries on Top of BigQuery Data

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2023-02-27, 25 min read, How-to. Original: [https://clickhouse.com/blog/clickhouse-bigquery-migrating-data-for-realtime-queries](https://clickhouse.com/blog/clickhouse-bigquery-migrating-data-for-realtime-queries)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- columnar data warehouses
- Google Cloud Storage ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))

## Keywords

ClickHouse, BigQuery, Google Cloud Storage, Dataflow, Apache Beam, MergeTree, s3Cluster, Ethereum

## Related posts

- [Why BigQuery can’t match ClickHouse Cloud for real-time analytics](https://swe.quest/articles/why-bigquery-can-t-match-clickhouse-cloud-for-real-time-analytics-fd197ffd824251d5.md): ClickHouse · 2026-10-08 · Medium · 19 min read · Analytics & OLAP, Performance engineering, Cost optimization, Cloud platforms, Data pipelines
  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.
- [Enhancing Google Analytics Data with ClickHouse](https://swe.quest/articles/enhancing-google-analytics-data-with-clickhouse-eb2048c17f27f5ac.md): ClickHouse · 2023-11-16 · Medium · 19 min read · Analytics & OLAP, Data pipelines, SQL
  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.
- [HIFI’s migration from BigQuery to ClickHouse](https://swe.quest/articles/hifi-s-migration-from-bigquery-to-clickhouse-5318550bbb72f66e.md): ClickHouse · 2023-01-09 · Medium · 8 min read · Analytics & OLAP, SQL, Databases, JavaScript
  HIFI moved music royalty analytics from BigQuery to ClickHouse because BigQuery's per-query pricing discouraged exploratory use and slot reservations didn't fit a startup's shifting workloads.
- [ClickHouse is data lake ready](https://swe.quest/articles/clickhouse-is-data-lake-ready-bebd3b2969b76478.md): ClickHouse · 2026-03-25 · Medium · 13 min read · Analytics & OLAP, Data pipelines, SQL, Query engines
  ClickHouse now queries Apache Iceberg and Delta Lake tables in place on S3, GCS and Azure, either directly or through catalogs such as AWS Glue, Unity, Polaris, BigLake, OneLake and Iceberg REST.
- [Why Flock Safety turned to ClickHouse for real-time vehicle traffic analytics](https://swe.quest/articles/why-flock-safety-turned-to-clickhouse-for-real-time-vehicle-traffic-analytics-f35b2dcb28006f8a.md): ClickHouse · 2025-04-29 · Medium · 5 min read · Analytics & OLAP, Data pipelines, Cloud platforms
  Flock Safety replaced a once-daily Redshift, DBT, Prefect and QuickSight SPICE pipeline with ClickHouse Cloud.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
