# Apache Iceberg (REST catalog)

Connect a managed or self-hosted catalog that implements the [Iceberg REST catalog protocol](https://iceberg.apache.org/docs/nightly/rest-protocol/). Send2Bucket commits each delivery batch to your table as one append snapshot.

## What you provide

| Field | Kind | Example |
|---|---|---|
| `catalog_uri` | setting | `https://catalog.example.com/api/catalog` |
| `warehouse` | setting | `analytics` |
| `namespace` | setting | `s2b` (must exist) |
| `table` | setting | `events` |
| `token` | credential | A bearer token for the catalog |
| `access_key_id`, `secret_access_key` | credential | An S3 key that can write the table's data files |
| `region` | setting | The data location's region |
| `endpoint` | setting, optional | For S3-compatible storage outside AWS |

Scope the token to the namespace: Send2Bucket needs to create and load the table and to commit appends. Scope the storage key to the table's data location.

For OpenTelemetry from SDKs or a Collector, see [Send OpenTelemetry to Apache Iceberg tables](../guides/opentelemetry-to-iceberg.md). For Cloudflare R2 Data Catalog (Basin Catalog), see [Write events and OpenTelemetry to Cloudflare R2 Data Catalog](../guides/cloudflare-r2-data-catalog.md).

## Setup

1. Create the namespace in your catalog.
2. Add the destination in the dashboard and select Verify. Send2Bucket creates the table with the columns in [Delivery format](../delivery-format.md#table-columns) if it is missing. Repeating setup, or two setups racing, reuses a compatible table.
3. An existing table with other columns is left untouched, and setup fails with `incompatible table: …`.

Send2Bucket follows the table's schema and partition spec. You can add a partition spec, for example on `day(ingested_at)`, before the first delivery.

## Delivery and retries

A batch is delivered when the catalog confirms the append snapshot. If that response is lost, Send2Bucket checks the table for the batch's `delivery_batch_id` before retrying, so a batch is committed once. Appends from your own jobs to the same table are kept.

## Query your data

- [DuckDB](../querying/duckdb.md#apache-iceberg-rest-catalog): attaches the catalog. Step by step: [Query Apache Iceberg tables with DuckDB](../guides/query-iceberg-with-duckdb.md).
- [Trino](../querying/trino.md): Iceberg connector with a REST catalog. Step by step: [Connect Trino to an Iceberg REST catalog](../guides/trino-iceberg-rest-catalog.md).
- [BigQuery](../querying/bigquery.md#query-iceberg-tables): BigLake Iceberg table, which lags behind new commits.
- [PostgreSQL](../querying/postgres.md): pg_duckdb, or load.
- [MySQL](../querying/mysql.md): load with DuckDB.
- [Python](../querying/python.md): Polars, PyIceberg or the duckdb package.
- [R](../querying/r.md): the duckdb package.
- [ClickHouse](../querying/clickhouse.md)
- [Snowflake](../querying/snowflake.md): step by step in [Query Apache Iceberg tables in Snowflake](../guides/snowflake-iceberg-tables.md).
- [Microsoft Fabric](../querying/fabric.md)
- [Apache Spark](../querying/spark.md)
- [StarRocks](../querying/starrocks.md)
- [Dremio](../querying/dremio.md)

To explore in a notebook or BI tool, see [Integrations](../integrations/index.md). The [querying overview](../querying/index.md) compares engines.
