Skip to content
DocumentationLakehouse

R2 Data Catalog

Cloudflare R2 Data Catalog exposes Iceberg tables through an Iceberg REST catalog. Connect it to Altertable when your Iceberg metadata is managed by Cloudflare and you want to query those tables alongside the rest of your lakehouse.

Prerequisites

Enable the catalog for the intended R2 bucket, then copy its Warehouse and Catalog URI from Cloudflare. The URI has the form https://catalog.cloudflarestorage.com/<account-id>/<bucket-name>; use the exact value Cloudflare provides.

Create a token with both catalog and storage read permissions. An object-only token cannot list or load Iceberg catalog metadata. For a read-only connection, use Cloudflare's Admin Read only permissions and scope access to the intended resources. See R2 token permissions for current permission groups and scopes.

Connect R2 Data Catalog

  1. Open Catalogs in the Altertable app.
  2. Click New catalog.
  3. Select R2 Data Catalog.
  4. Enter the warehouse, catalog URI, and token.
  5. Save the catalog.
  6. Query the exposed Iceberg tables with SQL.

Use a token scoped to the warehouse Altertable should read. If permissions change in Cloudflare, update or rotate the token in the catalog settings.

Verify the connection

Open the saved catalog and confirm that the expected namespaces and Iceberg tables appear. In SQL Explorer, replace the names with a real table:

SQL
SELECT * FROM my_catalog.my_namespace.my_table LIMIT 10;

Compare a known row with the source. This checks both catalog metadata access and the ability to read the underlying objects.

Troubleshooting

  • Unauthorized: check the token's catalog and storage permissions, expiry, and resource scope.
  • Warehouse not found: copy the warehouse and URI from the same bucket's catalog settings.
  • Tables appear but queries fail: check the token's object-read access to the table's data and metadata files.
  • A rotated token stops working: update the saved connection, then rerun the known-table query.