AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

basin

Build 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.

Original source
cloudflare
License
Apache-2.0
Pinned revision
e44f580f9c4fa3bf268e284ae7706c7954ba31fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read cloudflare--basin at revision e44f580f9c4fa3bf268e284ae7706c7954ba31fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 17

references/sql/configuration.md

Basin SQL Configuration

Auth and setup. For the current permission matrix and wrangler flags, pull https://developers.cloudflare.com/basin-sql/reference/wrangler-commands/index.md and the Basin Catalog manage-catalogs doc.

Prerequisites

  • R2 bucket with Basin Catalog enabled (catalog/configuration.md)
  • R2 API token: R2 Storage Admin Read & Write (includes Basin SQL Read), or add Basin SQL Read explicitly
  • Wrangler CLI (for CLI queries)

Open-beta limitation: R2 Storage Admin Read & Write is required even for read-only Basin SQL queries.

Enable Catalog + Get Warehouse

npx wrangler basin catalog enable my-bucket

You query by warehouse name ({ACCOUNT_ID}_{BUCKET}), shown in the output alongside the Catalog URI.

Configure Auth

Wrangler CLI

export WRANGLER_BASIN_SQL_AUTH_TOKEN=<your-token>
# or a .env file in the project dir (auto-loaded): WRANGLER_BASIN_SQL_AUTH_TOKEN=<your-token>

Wrangler does not use the wrangler login OAuth session for Basin SQL — the env var is required.

REST API

curl -X POST \
  "https://api.sql.cloudflarestorage.com/api/v1/accounts/$ACCOUNT_ID/basin-sql/query/$BUCKET" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"query": "SELECT * FROM default.my_table LIMIT 10"}'

Verify Setup

npx wrangler basin sql query "${ACCOUNT_ID}_my-bucket" "SHOW DATABASES"
npx wrangler basin sql query "${ACCOUNT_ID}_my-bucket" "SHOW TABLES IN default"

See Also