> ## Documentation Index
> Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SeaweedFS catalog

> Connect RisingWave to SeaweedFS table buckets, which serve an Iceberg REST catalog and store table data behind one S3 gateway.

[SeaweedFS](https://github.com/seaweedfs/seaweedfs) is an open-source distributed object store whose S3 Table Buckets provide both halves of an Iceberg deployment: the embedded Iceberg REST catalog serves the table metadata, and the table bucket stores the table data as Parquet files behind the same S3 gateway. You can use it with RisingWave when creating an Iceberg `SOURCE` or `SINK`.

<Note>
  SeaweedFS uses the same SigV4 REST catalog parameters as Amazon S3 Tables (`catalog.rest.sigv4_enabled`, `catalog.rest.signing_region`, and `catalog.rest.signing_name`). For the complete list of catalog-related parameters, see the main [Catalog configuration](/iceberg/catalogs#catalog-parameters) page.
</Note>

## Deploy SeaweedFS

For local testing, start the whole SeaweedFS stack in one container. The S3 credentials are provided through the standard `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables, which SeaweedFS picks up as a fallback when no `-s3.config` file is supplied. The `-tableBucket` flag pre-creates a table bucket named `analytics` that serves as the Iceberg warehouse:

```bash theme={null}
docker run -d --name seaweedfs -p 8333:8333 -p 8181:8181 \
    -e AWS_ACCESS_KEY_ID=your_access_key \
    -e AWS_SECRET_ACCESS_KEY=your_secret_key \
    chrislusf/seaweedfs:latest \
    mini -dir=/data -tableBucket=analytics
```

The S3 endpoint listens on port 8333 and the Iceberg REST catalog on port 8181.

## Required REST parameters

SeaweedFS authenticates catalog requests with AWS SigV4 signing, using the same access key and secret key as the S3 gateway:

| Parameter | Description | Value for SeaweedFS |
| - | - | - |
| `catalog.uri` | The SeaweedFS Iceberg REST endpoint. | `http://<seaweedfs-host>:8181` |
| `catalog.rest.sigv4_enabled` | Enables SigV4 signing. Must be `true`. | `true` |
| `catalog.rest.signing_region` | The region for signing requests. | e.g., `us-east-1` |
| `catalog.rest.signing_name` | The service name for signing requests. | `s3` |

## Read from an Iceberg table

The deployment step above creates only the `analytics` table bucket. The `default.orders` table must already exist in the catalog before you create a source — seed it with a tool such as [PyIceberg](https://py.iceberg.apache.org/) or another Iceberg client writing to the same SeaweedFS S3 gateway.

```sql theme={null}
CREATE SOURCE seaweedfs_orders WITH (
    connector = 'iceberg',
    catalog.type = 'rest',
    catalog.uri = 'http://<seaweedfs-host>:8181',
    catalog.name = 'default',
    database.name = 'default',
    table.name = 'orders',
    warehouse.path = 's3://analytics',
    s3.endpoint = 'http://<seaweedfs-host>:8333',
    s3.region = 'us-east-1',
    s3.access.key = '<your_access_key>',
    s3.secret.key = '<your_secret_key>',
    s3.path.style.access = 'true',
    catalog.rest.sigv4_enabled = true,
    catalog.rest.signing_region = 'us-east-1',
    catalog.rest.signing_name = 's3'
);

SELECT * FROM seaweedfs_orders;
```

## Write to an Iceberg table

```sql theme={null}
CREATE SINK seaweedfs_sink FROM my_table
WITH (
    connector = 'iceberg',
    catalog.type = 'rest',
    catalog.uri = 'http://<seaweedfs-host>:8181',
    catalog.name = 'default',
    database.name = 'default',
    table.name = 'orders',
    warehouse.path = 's3://analytics',
    s3.endpoint = 'http://<seaweedfs-host>:8333',
    s3.region = 'us-east-1',
    s3.access.key = '<your_access_key>',
    s3.secret.key = '<your_secret_key>',
    s3.path.style.access = 'true',
    catalog.rest.sigv4_enabled = true,
    catalog.rest.signing_region = 'us-east-1',
    catalog.rest.signing_name = 's3',
    create_table_if_not_exists = 'true',
    type = 'append-only',
    force_append_only = 'true'
);
```

Rows are committed to the Iceberg table at intervals controlled by `commit_checkpoint_interval` (default: about every 60 seconds), and other engines can read them through the same catalog.
