Warehouses connector

Cloudflare R2 SQL connector for governed AI agent access

Connect Cloudflare R2 SQL with an account ID, R2 bucket name, and API token for querying R2 Data Catalog Iceberg tables.

Query

Direct answer

OneQuery supports Cloudflare R2 SQL for governed agent access.

Teams use the Cloudflare R2 SQL connector to give AI agents SQL-style query workflows for structured data access while OneQuery keeps credentials centralized, limits access to approved sources, and preserves audit logs for review.

Agent workflow

What this connector enables

Cloudflare R2 SQL becomes an approved OneQuery source instead of a secret copied into an agent prompt, shell session, or model tool. The agent receives a governed access path, and the source credentials stay behind OneQuery.

  • Use SQL-style query workflows for structured data access for warehouses context.
  • Keep Cloudflare R2 SQL credentials centralized and out of agent runtimes.
  • Review agent access through OneQuery audit history instead of reconstructing direct service usage.

Setup checklist

Prepare the Cloudflare R2 SQL connection

Use cloudflare r2 sql credentials and connect the source through the Dashboard and CLI. Keep credentials scoped to the data the agent is allowed to read.

  1. Enable R2 Data Catalog for the bucket that owns the Iceberg tables OneQuery should query.
  2. Copy the Cloudflare Account ID and the R2 bucket name from the Cloudflare dashboard or Wrangler.
  3. Create a Cloudflare API token with R2 SQL read access plus R2 Data Catalog and R2 storage permissions for the target bucket.
  4. Only include `apiBaseUrl` when you need a non-default R2 SQL API origin.

FAQ

Cloudflare R2 SQL connector questions

What is the OneQuery Cloudflare R2 SQL connector?

The OneQuery Cloudflare R2 SQL connector makes warehouses context from Cloudflare R2 SQL available to AI agents through SQL-style query workflows for structured data access. Connect Cloudflare R2 SQL with an account ID, R2 bucket name, and API token for querying R2 Data Catalog Iceberg tables.

How do AI agents access Cloudflare R2 SQL through OneQuery?

Agents call OneQuery instead of receiving raw Cloudflare R2 SQL credentials. OneQuery keeps credentials centralized, applies source boundaries, and records access in audit logs while exposing SQL-style query workflows for structured data access.

How do I set up the Cloudflare R2 SQL connector?

Prepare cloudflare r2 sql credentials and connect Cloudflare R2 SQL from the OneQuery dashboard or CLI. Start with this setup step: Enable R2 Data Catalog for the bucket that owns the Iceberg tables OneQuery should query.