Manage catalogs
Learn how to:
- Enable and disable R2 Data Catalog on your buckets.
- Authenticate Iceberg engines using API tokens.
Enabling the catalog on a bucket turns on the REST catalog interface and provides a Catalog URI and Warehouse name required by Iceberg clients. Once enabled, you can create and manage Iceberg tables in that bucket.
-
In the Cloudflare dashboard, go to the R2 object storage page.
Go to Overview -
Select the bucket you want to enable as a data catalog.
-
Switch to the Settings tab, scroll down to R2 Data Catalog, and select Enable.
-
Once enabled, note the Catalog URI and Warehouse name.
To enable the catalog on your bucket, run the r2 bucket catalog enable command
:
npx wrangler r2 bucket catalog enable <BUCKET_NAME>
After enabling, Wrangler will return your catalog URI and warehouse name.
When you disable the catalog on a bucket, it immediately stops serving requests from the catalog interface. Any Iceberg table references stored in that catalog become inaccessible until you re-enable it.
-
In the Cloudflare dashboard, go to the R2 object storage page.
Go to Overview -
Select the bucket where you want to disable the data catalog.
-
Switch to the Settings tab, scroll down to R2 Data Catalog, and select Disable.
To disable the catalog on your bucket, run the r2 bucket catalog disable command
:
npx wrangler r2 bucket catalog disable <BUCKET_NAME>
Compaction improves query performance by combining the many small files created during data ingestion into fewer, larger files according to the set target file size
. For more information about compaction and why it's valuable, refer to About compaction.
-
In the Cloudflare dashboard, go to the R2 object storage page.
Go to Overview -
Select the bucket you want to enable compaction on.
-
Switch to the Settings tab, scroll down to R2 Data Catalog, and click on the Edit icon next to the compaction card.
-
Enable compaction and optionally set a target file size. The default is 128 MB.
-
(Optional) Provide a Cloudflare API token for compaction to access and rewrite files in your bucket.
-
Select Save.
To enable the compaction on your catalog, run the r2 bucket catalog enable command
:
npx wrangler r2 bucket catalog compaction enable <BUCKET_NAME> --target-size 128 --token <API_TOKEN>
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark