TL;DRA hands-on walkthrough of querying data lake tables, accelerating them with MergeTree, and writing results back to Iceberg. All steps use public datasets and work on both Cloud and OSS.
DataLakeCatalog database engine. If your tables live in a data catalog (Glue, Unity Catalog, REST, and others), connect with DataLakeCatalog so you can get access to all of your Iceberg/Delta tables in one function. The table function and table engine sections below are best for ad hoc queries or when you know a specific storage path and don’t use a catalog.
1
Query Iceberg data directly
The fastest way to start — especially for ad hoc queries or when you don’t use a catalog — is the Run a query:ClickHouse reads the Iceberg metadata directly from S3 and infers the schema automatically. The same approach works for
icebergS3() table function. Point it at an Iceberg table in S3 and query immediately, no setup required.Inspect the schema:deltaLake(), hudi(), and paimon().Learn more: Querying open table formats directly covers all four formats, cluster variants for distributed reads, and storage backend options (S3, Azure, HDFS, local).2
Create a persistent table engine
When you don’t use a catalog but will query the same path repeatedly, create a table using the Iceberg table engine so you don’t need to pass the path every time. The data stays in S3 — no data is duplicated:Now query it like any ClickHouse table:The table engine supports data caching, metadata caching, schema evolution, and time travel. See the Querying directly guide for details on table engine features and the support matrix for a full feature comparison.
3
Connect to a catalog
If your organization uses a data catalog, this is the integration path we recommend. Catalogs centralize table metadata and discovery — instead of managing a table definition for every storage path, connect once with the Each catalog type requires its own connection settings — see the Catalogs guides for the full list of supported catalogs and their configuration options.Browse tables and query:Learn more: Connecting to a data catalog walks through a full Unity Catalog setup with Delta and Iceberg examples.
DataLakeCatalog database engine. Every table in the catalog appears as a ClickHouse table, including tables added upstream after you create the connection.Here’s an example connecting to AWS Glue:Backticks are required around
<database>.<table> because ClickHouse doesn’t natively support more than one namespace.4
Issue a query
Regardless of which method you used above — table function, table engine, or The query syntax is identical — only the
DataLakeCatalog — the same ClickHouse SQL works across all of them. In production with a catalog, query through the DataLakeCatalog database; the other examples remain useful for quick tests and path-based access:FROM clause changes. All ClickHouse SQL functions, joins, and aggregations work the same way regardless of the data source.5
Load a subset into ClickHouse
Querying Iceberg directly is convenient, but performance is bounded by network throughput and the file layout. For analytical workloads, load data into a native MergeTree table.First, run a filtered query over the Iceberg table to get a baseline:This query scans the full dataset in S3 since Iceberg has no awareness of the Re-run the same query against the MergeTree table:Because
counterid filter — expect it to take several seconds.Now create a MergeTree table and load the data:counterid is the first column in the ORDER BY key, ClickHouse’s sparse primary index skips directly to the relevant granules — only reading the rows for counterid = 38 instead of scanning all 100 million rows. The result is a dramatic speedup.The accelerating analytics guide takes this further with LowCardinality types, full-text indices, and optimized ordering keys, demonstrating a ~40x improvement on a 283 million row dataset.Learn more: Accelerating analytics with MergeTree covers schema optimization, full-text indexing, and a complete before/after performance comparison.6
Write back to Iceberg
ClickHouse can also write data back to Iceberg tables, enabling reverse ETL workflows — publishing aggregated results or subsets for consumption by other tools (Spark, Trino, DuckDB, etc.).Create an Iceberg table for output:Write aggregated results:The resulting Iceberg table is readable by any Iceberg-compatible engine.Learn more: Writing data to open table formats covers writing raw data and aggregated results using the UK Price Paid dataset, including schema considerations when mapping ClickHouse types to Iceberg.
Next steps
Now that you’ve seen the full workflow, dive deeper into each area:- Connecting to catalogs — Recommended for catalog-backed workloads; full Unity Catalog walkthrough with Delta and Iceberg
- Querying directly — All four formats, cluster variants, table engines, caching
- Accelerating analytics — Schema optimization, indexing, ~40x speedup demo
- Writing to data lakes — Raw writes, aggregated writes, type mapping
- Support matrix — Feature comparison across formats and storage backends
- Best practices — Access method selection, performance settings, and workload patterns