fcakyon/claude-codex-settings / plugins/cloudflare-skills/skills/basin
basin
VerifiedBuild and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL names.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.9 KB |
| references/catalog/README.md | markdown | 1.2 KB |
| references/catalog/api.md | markdown | 3.3 KB |
| references/catalog/configuration.md | markdown | 2.1 KB |
| references/catalog/gotchas.md | markdown | 2.2 KB |
| references/catalog/patterns.md | markdown | 1.7 KB |
| references/pipelines/README.md | markdown | 4.5 KB |
| references/pipelines/api.md | markdown | 5.0 KB |
| references/pipelines/configuration.md | markdown | 6.1 KB |
| references/pipelines/gotchas.md | markdown | 3.0 KB |
| references/pipelines/patterns.md | markdown | 4.6 KB |
| references/skill-feedback.md | markdown | 2.7 KB |
| references/sql/README.md | markdown | 3.4 KB |
| references/sql/api.md | markdown | 4.8 KB |
| references/sql/configuration.md | markdown | 1.7 KB |
| references/sql/gotchas.md | markdown | 2.0 KB |
| references/sql/patterns.md | markdown | 4.3 KB |
references/pipelines/README.md
View on GitHub# Basin Pipelines
Streaming ingest: receive events over HTTP/Workers/Logpush, transform with SQL, write to R2 as Iceberg tables or Parquet/JSON files.
## Documentation
This reference is a fast-start with verified code and gotchas. For limits, settings, full SQL syntax, and pricing, **retrieve the live docs** — use the Cloudflare MCP `docs` tool if available, otherwise `webfetch` the URL. Docs are source of truth over this file.
| Topic | URL |
|-------|-----|
| Overview / getting started | `https://developers.cloudflare.com/basin-pipelines/getting-started/index.md` |
| Streams (write, manage, Logpush) | `https://developers.cloudflare.com/basin-pipelines/streams/index.md` |
| Sinks | `https://developers.cloudflare.com/basin-pipelines/sinks/index.md` |
| Basin Pipelines & SQL transforms | `https://developers.cloudflare.com/basin-pipelines/pipelines/index.md` |
| SQL reference (statements, types) | `https://developers.cloudflare.com/basin-pipelines/sql-reference/index.md` |
| Wrangler commands | `https://developers.cloudflare.com/basin-pipelines/reference/wrangler-commands/index.md` |
| Terraform | `https://developers.cloudflare.com/basin-pipelines/reference/terraform/index.md` |
| Limits | `https://developers.cloudflare.com/basin-pipelines/platform/limits/index.md` |
| Pricing | `https://developers.cloudflare.com/basin-pipelines/platform/pricing/index.md` |
| Metrics (GraphQL) | `https://developers.cloudflare.com/basin-pipelines/observability/metrics/index.md` |
## Three Components
```
Sources → Stream → Pipeline (SQL) → Sink → R2
↑ ↓ ↓
HTTP / Workers / Transform Iceberg (Basin Catalog)
Logpush (row-level) or Parquet/JSON files
```
| Component | Purpose |
|-----------|---------|
| **Stream** | Receives events (HTTP endpoint, Worker binding, or Logpush). Structured (schema-validated) or unstructured. |
| **Pipeline** | SQL connecting a stream to a sink. Row-level transforms only — no GROUP BY/aggregation. |
| **Sink** | Writes to R2 — Iceberg via Basin Catalog, or raw Parquet/JSON. |
**Status:** The linked docs PR proposes Basin general availability. Verify current availability, limits, and pricing in the live docs before making claims or sizing workloads.
## Quick Start
```bash
# Interactive — creates stream + sink + pipeline, optionally bucket + catalog
npx wrangler basin pipelines setup
```
Minimal Worker producer:
```typescript
interface Env { MY_STREAM: Pipeline; }
export default {
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
ctx.waitUntil(env.MY_STREAM.send([{ event_id: crypto.randomUUID(), amount: 29.99 }]));
return new Response("OK");
}
} satisfies ExportedHandler<Env>;
```
## Which Sink Type?
```
Need SQL queries / ACID / time-travel on the data?
→ Basin Catalog (Iceberg) ✅ Basin SQL, schema evolution ❌ more setup
Just archival / external tools (Spark, Athena)?
→ R2 raw files (Parquet/JSON) ✅ simple, partitioned files ❌ no built-in SQL
```
## Critical Behaviors (read before building)
These are non-obvious and prevent most failures — see [gotchas.md](gotchas.md) for detail.
- **Everything is immutable after creation** — stream schema, pipeline SQL, sink config. To change, delete and recreate.
- **Sinks create their own table** — they cannot target an existing Iceberg table.
- **`__ingest_ts` is added automatically** (TIMESTAMP, partitioned by day). Don't define it in your schema.
- **Data isn't queryable immediately** — first flush takes **3–7 minutes** (warm-up + table creation) even with a short roll interval.
- **Schema validation is deferred** — invalid events are accepted then silently dropped. Monitor via GraphQL error metrics.
- **Binding field renamed `pipeline` → `stream`** (June 2026); old field still accepted.
## Reading Order
1. [configuration.md](configuration.md) — schema, streams, sinks, pipelines (CLI + REST + Terraform), bindings
2. [api.md](api.md) — `send()`, HTTP ingest, REST API, pipeline SQL, lifecycle states
3. [patterns.md](patterns.md) — fire-and-forget, validation, Logpush, observability, end-to-end
4. [gotchas.md](gotchas.md) — silent drops, immutability, REST≠CLI field names
## See Also
- [Basin Catalog](../catalog/) — Iceberg sink destination
- [Basin SQL](../sql/) — query the ingested data
- [r2](https://developers.cloudflare.com/r2/index.md) · [queues](https://developers.cloudflare.com/queues/index.md) · [workers](https://developers.cloudflare.com/workers/index.md)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |