Browse the data
List schemas and tables, read rows and run one read-only query at a time, without a client of your own.
The data browser connects from the platform's control plane with the database's master credential, so you need no client of your own. Replace ewdb-0123456789ab with your database's id.
Prerequisites
- Permission for
rds:QueryDatabaseon the database. It is a sensitive read: the read-only presets do not include it, and every use, allowed or refused, is recorded in the audit log. - The database is available.
- The control plane can reach the database. A private cluster is reached on its primary's own
address. A private database the control plane cannot reach answers with an error that starts
This database is private, so it accepts connections only from inside its own network; connect from an instance in its network instead. - In the console, also
rds:DescribeDBInstancesto open the database's page (without it the page is not found).
Browse and query
- Open the database, then choose Data.
- In Tables, choose a table's name to see its rows, 50 to a page; choose Next and Previous to page, and All tables to go back.
- To run a statement, choose Query, enter it, and choose Run (or press Ctrl+Enter).
dcloud rds data list-relations ewdb-0123456789ab
dcloud rds data read-rows ewdb-0123456789ab --schema public --table orders --limit 50
dcloud rds data run-query ewdb-0123456789ab --sql "SELECT count(*) FROM orders"POST /rds/api/instances/ewdb-0123456789ab/data/query
{ "sql": "SELECT count(*) FROM orders", "limit": 200 }Not available in Terraform. Reading data is not configuration.
Result
The tables list shows the tables, views and materialized views outside the system schemas, with
sizes and row estimates (the planner's estimate, not an exact count). read-rows returns 50 rows by
default and at most 200 to a page.
A query is one statement that starts with SELECT, WITH, TABLE, VALUES, EXPLAIN (without
ANALYZE) or SHOW. It runs in a READ ONLY transaction with a 15-second statement timeout and
returns 200 rows by default, at most 500 through the CLI and API; the console asks for 200 and says
when there are more. A statement that is refused or fails returns 400 with the reason, for example
Run one statement at a time — everything after the first semicolon was refused.
A database that is not available is refused with
This database is <status>. Data is readable once it is available. (409).