Skip to main content

Cloudflare D1 Connections

TablePro connects to Cloudflare D1, a serverless SQLite-compatible database, via the Cloudflare REST API. No direct database connection or SSH tunnel is involved. The driver is a downloadable plugin; TablePro offers to install it when you select Cloudflare D1 in the connection form. See Plugins.

Connection Settings

Cloudflare D1 connection form with Database, Account ID, and API Token fields

The Cloudflare D1 connection form

Click Test Connection to verify, then Save & Connect.

Getting Your Credentials

Account ID: On the Cloudflare dashboard right sidebar, or npx wrangler whoami. API Token:
  1. Go to Cloudflare API Tokens
  2. Click Create Token and pick the Custom token template
  3. Add permission Account > D1 > Edit
  4. Save and copy the token
The token grants access to all D1 databases in your account. Scope it to the account you need.

Database Management

Use the database switcher in the toolbar to list every D1 database in your account and switch between them without reconnecting. You can also create and drop D1 databases directly from TablePro, or with wrangler d1 create <name>.

Schema and Triggers

The structure editor works for D1: add, modify, and drop columns via generated ALTER TABLE DDL. Triggers can be viewed and edited from the sidebar.

SQL Dialect

D1 uses SQLite syntax; browsing, structure, EXPLAIN QUERY PLAN, data editing, and export work as they do for SQLite. See SQLite.

Troubleshooting

Authentication failed: Check the token has D1 Edit permission, the Account ID matches, and the token has not expired or been revoked. Database not found: Verify the name or UUID with wrangler d1 list and confirm the token can access the account that owns the database.

Known Limitations

  • No persistent connections: each query is an independent HTTP request with no session state
  • No multi-statement transactions: each SQL statement auto-commits independently
  • 10 GB limit per D1 database; shard for larger datasets
  • Cloudflare API rate limits apply; TablePro surfaces rate limit errors with retry timing
  • No bulk import through the plugin: use wrangler d1 execute with SQL files
  • No custom SSL/SSH: D1 is HTTPS-only via the Cloudflare API