Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/pipelines/gotchas.md
1# Pipelines Gotchas23Non-obvious failure modes (not well covered by docs). For current limits and error semantics, pull `https://developers.cloudflare.com/pipelines/platform/limits/`.45## Events accepted but never appear (most common)67HTTP 200 / `send()` resolves, but no data in the sink. Causes:891. **Schema validation failure** — structured streams accept then **silently drop** invalid events during processing. Validate client-side (Zod) and monitor `pipelinesUserErrorsAdaptiveGroups`.102. **First-flush warm-up** — first data takes **3–7 minutes** (warm-up + namespace/table creation) even with `--roll-interval 10`. Poll ≥5 min in tests.113. **Roll interval not elapsed** — default 300s.124. **Silent sink failure** — deleted bucket or expired token. Check `recordsWritten > 0` but `filesWritten = 0`; inspect `failure_reason` via `GET /pipelines/{id}`.1314## Everything is immutable1516Cannot modify stream schema, pipeline SQL, or sink config — delete and recreate. Use version naming (`events_v1`) and keep SQL in version control.1718```bash19curl -X DELETE "$BASE_URL/pipelines/{id}" -H "Authorization: Bearer $API_TOKEN"20curl -X DELETE "$BASE_URL/sinks/{id}" -H "Authorization: Bearer $API_TOKEN"21curl -X DELETE "$BASE_URL/streams/{id}" -H "Authorization: Bearer $API_TOKEN"22```2324## Worker binding undefined (`env.MY_STREAM`)25261. Use the **stream ID**, not pipeline ID, in `wrangler.jsonc`.272. Binding field is `"stream"` (June 2026); old `"pipeline"` still works.283. Redeploy after adding the binding.2930## REST API field names ≠ CLI flags3132`r2_data_catalog` vs `--type r2-data-catalog`, `table_name` vs `--table`, `token` vs `--catalog-token`, and `format` is required in REST but implied in CLI. See [configuration.md](configuration.md#option-c-rest-api-programmatic).3334## `wrangler pipelines delete` defaults to "no"3536Non-interactive environments answer "no" automatically — use REST `DELETE` for CI/automation.3738## Behavioral Notes3940- **`__ingest_ts` auto-added** (TIMESTAMP, day-partitioned). Don't put it in your schema.41- **Sinks can't target existing tables** — the sink creates its own. Use PySpark to write to existing tables.42- **JSON-only input** — no Avro/Protobuf/CSV.43- **Naming:** streams/sinks/pipelines use underscores; buckets use hyphens.44- **Metrics lag 5–10 min** after creation.45- **Pipeline SQL is row-level only** — no GROUP BY/aggregation/window functions (do aggregation in [R2 SQL](../r2-sql/) at query time). CTEs and `UNNEST` are supported.4647## Debug Checklist4849- [ ] Stream exists: `wrangler pipelines streams list`50- [ ] Pipeline `running` (not `initializing`/`failed`): `GET /pipelines/{id}`, check `failure_reason`51- [ ] SQL matches schema; sink token valid; bucket + catalog exist52- [ ] Worker redeployed; binding uses **stream ID** under `"stream"`53- [ ] Waited ≥5 min (first flush)54- [ ] Sink metrics: `filesWritten > 0`; error metrics show no drops5556## See Also5758- [configuration.md](configuration.md) · [api.md](api.md) · [patterns.md](patterns.md)59