Skip to main content

Planetscale

PlanetScale is a serverless MySQL database platform built on Vitess that provides scalable, highly available database infrastructure with unique branching and deployment capabilities similar to Git workflows. This data integration platform enables users to query and monitor various aspects of their PlanetScale databases, including database infrastructure, security configurations, backup systems, deployment workflows, and audit trails.

CategoryDatabase
DirectionQuery source
Sign-inAccess Token
Query languagesSQLite
Tables10
Query templates27
Websiteplanetscale.com

Before you start​

Huntbase signs in to Planetscale with Access Token. Create the credential in Planetscale first, then keep it to hand for the Connect step.

  1. Install the PlanetScale CLI, pscale.
  2. Run pscale auth login and confirm the device in the browser window that opens.
  3. Copy the access token from ~/.config/planetscale/access-token.
Watch out for
  • Access tokens from pscale auth login are valid for one month, so you'll need to replace the token when it expires.

For the vendor's own instructions, see PlanetScale CLI authentication documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect Planetscale​

  1. Go to Connections and click New connection, or click New connection on the Planetscale product page.
  2. On Product, pick Planetscale and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Settings​

Where your Planetscale lives:

FieldRequiredNotes
Organization NameYesThe name of the PlanetScale organization to query.

Credentials​

The only Method is Access Token. Enter a Credential label (for example Production), then fill in:

FieldRequiredNotes
Access TokenYesThe access token from pscale auth login, which looks like pscale_oauth_.... Not a service token. Secret — not shown again after you save it.

Query it​

Once connected, Planetscale can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 10 tables listed below, alongside every other connected source.

Example: SQLite​

List all regions — Explore all the geographical regions in which the database service operates, to better understand its global distribution and reach.

select
*
from
planetscale_region;

Planetscale ships with 27 query templates. Find them in Library › Queries — see Query templates.

Tables​

Planetscale adds 10 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 10 tables
TableContains
planetscale_audit_logAuditLogs in the PlanetScale account.
planetscale_backupDatabase Branches in the PlanetScale account.
planetscale_certificateDatabase Branches in the PlanetScale account.
planetscale_databaseDatabases in the PlanetScale account.
planetscale_database_branchDatabase Branches in the PlanetScale account.
planetscale_deploy_requestDeploy Requests in the PlanetScale account.
planetscale_organizationOrganizations in the PlanetScale account.
planetscale_passwordDatabase Branches in the PlanetScale account.
planetscale_regionRegions in the PlanetScale account.
planetscale_service_tokenService tokens in the PlanetScale account.

Next steps​