Standard REST Catalog API means you're never locked in to a single tool
from pyiceberg.catalog.rest import RestCatalogcatalog = RestCatalog(name="r2_catalog",uri="https://<CATALOG_URI>",warehouse="<WAREHOUSE>",credential="<API_TOKEN>")# List all tablesfor table in catalog.list_tables("default"):print(table)# Query with PyArrowtable = catalog.load_table("default.events")df = table.scan().to_pandas()
-- Attach R2 Data CatalogATTACH 'r2://<WAREHOUSE>' AS r2_warehouse (TYPE ICEBERG,ENDPOINT '<CATALOG_URI>',TOKEN '<API_TOKEN>');-- Query directly from R2SELECTevent_type,COUNT(*) as eventsFROM r2_warehouse.default.eventsWHERE event_time > '2025-01-01'GROUP BY event_type;