Integration with the SeaweedFS catalog works with Iceberg tables only.
- Single service - catalog metadata and Parquet data are served by one process, with no separate metadata database
- REST API compliance with the Iceberg REST catalog specification
- Server-side maintenance - automatic Parquet compaction and snapshot expiration, with no external maintenance service
As this feature is experimental, you will need to enable it using:
SET allow_experimental_database_iceberg = 1;Local development setup
For local development and testing, you can run SeaweedFS and ClickHouse with Docker Compose. This approach is ideal for learning, prototyping, and development environments.Prerequisites
- Docker and Docker Compose: Ensure Docker is installed and running
- Versions: SeaweedFS 4.42 or later; ClickHouse 26.8 or later (versions back to 25.8 can read and insert, but creating tables through the catalog requires 26.8)
- Python with PyIceberg (optional): used below to seed sample data
Setting up the local SeaweedFS catalog
Step 1: Create a new folder in which to run the example, then create a files3config.json with the credentials for the S3 gateway and the catalog:
docker-compose.yml with the following configuration:
mini command starts the whole SeaweedFS stack in a single container. The -tableBucket=analytics flag pre-creates an S3 Tables bucket named analytics, which serves as the Iceberg warehouse.
Step 3: Run the following command to start the services:
Seeding sample data
The catalog starts out empty. Create a table and append a few rows with PyIceberg (pip install pyiceberg pyarrow):
Connecting to the local SeaweedFS catalog
Connect to your ClickHouse container:catalog_credential and oauth_server_uri authenticate to the catalog itself through the OAuth2 client-credentials flow. SeaweedFS accepts the same access key and secret key for both.
Querying SeaweedFS catalog tables using ClickHouse
Now that the connection is in place, you can start querying via the SeaweedFS catalog. For example:Backticks requiredBackticks are required because ClickHouse doesn’t support more than one namespace.
Creating tables and writing data from ClickHouse
You can also create tables in the SeaweedFS catalog and write to them directly from ClickHouse:IcebergS3 engine clause names the storage path for the new table, and write_full_path_in_iceberg_metadata makes ClickHouse register the full table location with the catalog.
Creating tables through a catalog requires ClickHouse 26.8 or later. Versions 26.4 through 26.7 write the table files before registering the namespace, which SeaweedFS rejects unless the namespace already exists in the catalog; versions before 26.4 appear to succeed, but the table files are written to object storage without being registered in the catalog.
Loading data from your Data Lake into ClickHouse
If you need to load data from the SeaweedFS catalog into ClickHouse, start by creating a local ClickHouse table:INSERT INTO SELECT: