In the previous guides, you queried open table formats in place and loaded data into MergeTree for fast analytics. In many architectures, data also needs to flow in the other direction - from ClickHouse back into open table formats. Two common scenarios drive this:Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Offloading to long-term storage - Data arrives in ClickHouse as a real-time analytics layer, powering dashboards and operational reporting. Once the data ages beyond its real-time window, it can be written out to Iceberg in object storage for durable, cost-effective retention in an interoperable format.
- Reverse ETL - Transformations, aggregations, and enrichment performed inside ClickHouse produce derived datasets that downstream tools and other teams need to consume. Writing these results to Iceberg tables makes them available across the broader data ecosystem.
INSERT INTO SELECT lets you move data from ClickHouse tables into Iceberg tables stored in object storage.
Writing to open table formats is currently supported for Iceberg tables only. Partial support for Delta Lake tables is under development. Tables must not be managed by a catalog.
Prepare a source dataset
For this guide, we’ll use the UK Price Paid dataset - a public record of every residential property transaction in England and Wales.Create and populate a MergeTree table
Write data to an Iceberg table
Create the Iceberg table
To write data into Iceberg, create a table using theIcebergS3 table engine.
Note that the schema must be simplified compared to the MergeTree source. ClickHouse supports a richer type system than Iceberg and the underlying Parquet files - types such as Enum, LowCardinality, and UInt8 are not supported in Iceberg and must be mapped to compatible types.
Insert a subset of data
UseINSERT INTO SELECT to write data from the MergeTree table into the Iceberg table. In this example, we write only London transactions: