---
title: "How we built the Internal Data Warehouse at ClickHouse"
description: "ClickHouse's internal data warehouse ingests tens of sources (Control Plane, Data Plane, AWS CUR, GCP billing, Salesforce, M3ter and others) into S3 hourly, then loads them into ClickHouse Cloud with the s3 table function and transforms them in SQL."
url: "https://swe.quest/articles/how-we-built-the-internal-data-warehouse-at-clickhouse-d3d7520881242252"
canonical: "https://clickhouse.com/blog/building-a-data-warehouse-with-clickhouse"
source: "ClickHouse"
published: "2023-07-19"
difficulty: "medium"
kind: "Case study"
reading_minutes: 16
tags: ["analytics","data-pipelines","system-design","identity-auth","scheduling"]
---

# How we built the Internal Data Warehouse at ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2023-07-19, 16 min read, Case study. Original: [https://clickhouse.com/blog/building-a-data-warehouse-with-clickhouse](https://clickhouse.com/blog/building-a-data-warehouse-with-clickhouse)

## Summary

ClickHouse's internal data warehouse ingests tens of sources (Control Plane, Data Plane, AWS CUR, GCP billing, Salesforce, M3ter and others) into S3 hourly, then loads them into ClickHouse Cloud with the s3 table function and transforms them in SQL. Airflow schedules the work and Superset serves BI to about 100 users. Idempotency comes from ReplicatedReplacingMergeTree with FINAL plus re-runnable DAGs. Consistency comes from insert\_quorum=3 rather than "auto", so inserts fail and retry during node restarts instead of leaving replicas incomplete. The team also found it needed a third intermediate business-entity layer beyond raw and mart, chose a single large transformation DAG over Airflow dataset triggers, and drives database-level access control from Google groups mapped to tables, columns and row filters.

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)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Scheduling](https://swe.quest/tags/scheduling.md) (Distributed systems)

## Prerequisites

- data warehouse concepts ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- ETL/ELT pipelines ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))
- Apache Airflow DAGs ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))
- ClickHouse table engines ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse Cloud, Apache Airflow, Apache Superset, ReplicatedReplacingMergeTree, insert\_quorum, AWS S3, Redis

## Related posts

- [How we built our Internal Data Warehouse at ClickHouse: A year later](https://swe.quest/articles/how-we-built-our-internal-data-warehouse-at-clickhouse-a-year-later-38e2018d0874b279.md): ClickHouse · 2024-09-10 · Medium · 9 min read · Analytics & OLAP, Data pipelines, Cost optimization
  ClickHouse's internal data warehouse on ClickHouse Cloud now ingests about 6 billion rows (50 TB uncompressed) a day from nineteen sources and holds 470 TB compressed.
- [98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse](https://swe.quest/articles/98-faster-queries-50-lower-cloud-costs-verihubs-journey-from-postgres-to-f6535061aff525b1.md): ClickHouse · 2026-07-06 · Medium · 6 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Event-driven architecture
  Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack.
- [How Suprema Gaming made its data platform agent-ready with ClickHouse Cloud](https://swe.quest/articles/how-suprema-gaming-made-its-data-platform-agent-ready-with-clickhouse-cloud-456ba316ef057ccc.md): ClickHouse · 2026-08-25 · Medium · 11 min read · Analytics & OLAP, Data pipelines, AI agents, Games
  Suprema Gaming moved its analytics warehouse from Snowflake to ClickHouse Cloud so that AI agents could query fresh, governed data directly.
- [Building a Unified Data Platform with ClickHouse](https://swe.quest/articles/building-a-unified-data-platform-with-clickhouse-cc8bf54cebee136c.md): ClickHouse · 2023-07-28 · Medium · 10 min read · Analytics & OLAP, Databases, Data pipelines, Performance engineering, Go
  Synq, a data observability startup, consolidated its user-facing application, internal BI, in-app analytics and ML training data onto a single ClickHouse Cloud cluster after Postgres with a time-series plugin struggled with large backfills.
- [Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse](https://swe.quest/articles/data-hive-the-story-of-beehiiv-s-journey-from-postgres-to-clickhouse-467867cb2bebb87b.md): ClickHouse · 2024-08-21 · Easy · 6 min read · Analytics & OLAP, Databases, PostgreSQL, Stream processing, Queues & messaging
  beehiiv replaced its Postgres-and-Ruby-queue analytics system, which struggled with billions of email events and had multi-hour reporting delays, with a Kafka-fed ClickHouse Cloud pipeline.

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)
