turbot/planetscale
steampipe plugin install planetscale

Table: planetscale_database - Query PlanetScale Databases using SQL

PlanetScale is a database as a service that provides a scalable, transactional, and serverless relational database built on MySQL and Kubernetes. It allows for easy database management and operations, including creating, deploying, and scaling databases. It is designed to handle heavy traffic, large datasets, and to provide high availability and strong consistency.

Table Usage Guide

The planetscale_database table provides insights into databases within PlanetScale. As a database administrator or a DevOps engineer, explore database-specific details through this table, including configurations, branches, and connection strings. Utilize it to uncover information about databases, such as their operational status, deployment details, and to manage database versions and configurations.

Examples

List all databases

Explore all the databases available in your system to understand their structure and organization. This could help in managing data more efficiently and making informed decisions for data manipulation or migration.

select
*
from
planetscale_database;
select
*
from
planetscale_database;

Databases created in the last week

Discover the databases that have been established within the past week. This can be beneficial for monitoring recent activity and assessing the growth of your data infrastructure.

select
*
from
planetscale_database
where
age(created_at) < interval '7 days';
select
*
from
planetscale_database
where
julianday('now') - julianday(created_at) < 7;

Databases in US regions

Explore which databases are located in US regions to optimize data management and improve latency. This can be beneficial in enhancing user experience and ensuring efficient data access.

select
*
from
planetscale_database
where
region like 'us-%';
select
*
from
planetscale_database
where
region like 'us-%';

Schema for planetscale_database

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
created_attimestamp with time zoneWhen the database was created.
nametext=Name of the database.
notestextNotes for the database.
organization_nametext=, !=, ~~, ~~*, !~~, !~~*The name of the organization.
region_slugtextRegion where the database is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
updated_attimestamp with time zoneWhen the database was updated.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- planetscale

You can pass the configuration to the command with the --config argument:

steampipe_export_planetscale --config '<your_config>' planetscale_database