Collect, transform, manage, and query analytics data with a serverless platform built on Apache Iceberg ↗︎ and R2.
Basin is an end-to-end analytics data platform that brings ingestion, table management, and distributed SQL together to Cloudflare's Developer Platform. It receives data from applications, infrastructure, devices, and Cloudflare services, transforms events during ingestion, stores them in open Iceberg tables, and makes it queryable with Basin SQL or compatible external engines.
--- title: Basin data flow --- flowchart LR pipelines["Basin Pipelines"] catalog["Basin Catalog<br/>Apache Iceberg tables"] sql["Basin SQL &<br/>compatible external engines"] pipelines -->|processes and ingests events| catalog catalog -->|queried by| sql
With Basin, you can expect to:
- Ingest and transform events without managing streaming infrastructure
- Keep data portable through the open Apache Iceberg standard
- Maintain tables automatically with compaction and snapshot expiration
- Run globally distributed OLAP queries without managing query clusters
- Access tables stored in R2 without egress fees
To build your first request analytics workflow, follow the Basin CLI guide.
Use Basin Pipelines to receive events through HTTP endpoints or Workers bindings. It transforms events with SQL and writes Iceberg tables or files to R2.
Run the setup command to configure a stream, sink, and pipeline:
npx wrangler basin pipelines setupyarn wrangler basin pipelines setuppnpm wrangler basin pipelines setupConfigure streaming ingestion, SQL transformations, and R2 destinations.
Use Basin Catalog to manage Iceberg metadata in your R2 bucket. It provides an Iceberg REST catalog and automatic table maintenance.
Enable Basin Catalog on an existing R2 bucket:
npx wrangler basin catalog enable YOUR_BUCKET_NAMEyarn wrangler basin catalog enable YOUR_BUCKET_NAMEpnpm wrangler basin catalog enable YOUR_BUCKET_NAMEManage catalogs, maintain tables, and connect compatible Iceberg engines.
Use Basin SQL to run distributed online analytical processing (OLAP) queries across catalog tables. It uses Cloudflare's global network without requiring query clusters.
Query a table in your warehouse with SQL:
npx wrangler basin sql query YOUR_WAREHOUSE_NAME "SELECT * FROM default.events LIMIT 10"yarn wrangler basin sql query YOUR_WAREHOUSE_NAME "SELECT * FROM default.events LIMIT 10"pnpm wrangler basin sql query YOUR_WAREHOUSE_NAME "SELECT * FROM default.events LIMIT 10"Run SQL queries, review supported syntax, and monitor query usage.
What's new
The latest features and improvements across Basin.
Basin Pipelines ingest limit increased to 1 GB/s
Basin Pipelines streams can ingest up to 1 GB/s each, increased from the previous 5 MB/s limit.
Cloudflare Basin is now generally available
Cloudflare Data Platform is now Basin, bringing generally available ingestion, Iceberg table management, and SQL analytics together on R2.
R2 Data Catalog adds table maintenance visibility and manual queueing
View table maintenance schedules and run history, queue compaction from the dashboard, and browse catalogs with an updated layout.
Billing is now enabled for R2 Data Catalog
R2 Data Catalog usage is now billed on non-enterprise accounts. R2 Data Catalog usage beyond the included free tier will appear on your next invoice.
Billing is now enabled for Pipelines
Cloudflare Pipelines usage is now billed on non-enterprise accounts. Pipelines usage beyond the included free tier will appear on your next invoice.
Billing is now enabled for R2 SQL
R2 SQL usage is now billed on non-enterprise accounts. R2 SQL usage beyond the included free tier will appear on your next invoice.
R2 Data Catalog now supports read-only API tokens
Connect query engines to R2 Data Catalog using read-only API tokens
R2 Data Catalog compaction now optimizes manifest files
Compaction automatically rewrites and clusters Apache Iceberg manifest files to reduce metadata overhead and speed up query planning