Guide
The query console
Every database has a Query tab in the dashboard that runs queries against it from the browser, no local client needed. The console adapts to the engine you are on: a SQL editor for SQL databases, a command box for Redis, a JavaScript shell for MongoDB, and so on. This page covers what the console can do, its limits, and the Import menu for loading data from a file.
The console per engine
What you type depends on the engine family. The console picks the right editor and syntax automatically:
- SQL (PostgreSQL, MySQL, MariaDB, CockroachDB, SQLite, DuckDB, ClickHouse, QuestDB, LibSQL, SurrealDB, InfluxDB, TypeDB): write SQL and run it. Some of these use a dialect of their own, noted below.
- Key-value (Redis, Valkey): type CLI commands like
PING,KEYS *, orGET mykey. - Document (MongoDB, FerretDB): write mongosh JavaScript, for example
db.collection.find({ }). A leadingdb.is added for you if you leave it off. - REST API (Qdrant, Meilisearch, CouchDB, Weaviate): send requests in
METHOD /path [body]form, for exampleGET /collections. - Ledger (TigerBeetle): use the structured ledger form. TigerBeetle has no free-text query language, so there is no text editor for it.
Engine-specific behavior
A few engines have quirks that trip people up:
- ClickHouse always returns JSON in the console. A
FORMATclause in your query is ignored, so do not rely on it to change the output shape here. - InfluxDB accepts both SQL and REST in the same editor. It routes on the leading verb: start a line with
GET,POST,PUT, orDELETEto send REST, otherwise it runs as SQL. - SurrealDB uses SurrealQL. Listing tables runs
INFO FOR DB;, which returns a structured info block rather than a plain table list. - TypeDB uses TypeQL (for example
match $x isa $t;) and each query runs inside a read transaction.
Writes and the destructive-statement prompt
The console runs whatever you type, including writes. There is no separate read-only mode you have to switch out of. As a safety net, the SQL console scans your query before running and prompts you to confirm when it spots a statement that can irreversibly change or delete data: DROP, TRUNCATE, a DELETE or UPDATE with no WHERE clause, or an ALTER that drops a column. Confirm to proceed, or cancel and edit the query first.
Editor size and output
The query editor is capped at about 10 KB of text. That is plenty for day-to-day queries, but it means you cannot paste a large dump or a long migration script into the box. To load a big file, use the Import menu below instead.
Output is append-only: results and errors stack up as you run queries. An old error line (a NOAUTH message, an exit code, a stale failure) can stay visible even after you have fixed the underlying problem. If something looks broken, reload the page and run a fresh query before concluding the issue is still there.
The Import menu
SQL consoles show an Import control above the editor. On PostgreSQL, MySQL, MariaDB, CockroachDB, ClickHouse, SQLite, and DuckDB it is a dropdown with three separate actions. The other SQL consoles (SurrealDB, LibSQL, TypeDB) show only the full-database restore. The chart-first time-series consoles (QuestDB, InfluxDB) and the non-SQL consoles (key-value, document, REST, ledger) have no Import menu. Uploaded files are processed on the server and then deleted; they are never stored.
Import a CSV into a table
This loads a delimited file into one table and leaves the rest of the database alone. Pick a file, then set the target table and mode in the dialog. You can also drag a file straight onto the editor to open the same dialog.
- Target table name must be lowercase letters, numbers, and underscores, start with a letter or underscore, and be at most 63 characters. The name is pre-filled from the file name; edit it if you want.
- Create or replace builds the table fresh (replacing any existing table of that name), or Append to existing table adds the rows to a table that is already there.
- File types: CSV and TSV on every SQL engine. DuckDB additionally accepts JSON, NDJSON, and Parquet.
- Size: the upload ceiling is 100 MB. For a larger dataset, host it at a URL and read it directly from a query instead.
Run a SQL file
This replays the statements in a .sql file against the database. It is the escape hatch from the 10 KB editor cap: a migration or seed script that will not fit in the box runs fine as a file. Whether it changes or deletes data is entirely up to what the file contains.
Restore a full database
This is the only destructive import, so it always asks you to confirm first. What it accepts and does depends on the engine:
- SQLite and DuckDB take a database file (a
.sqlite/.dbor.duckdbfile) and replace the entire database with it. - Every other SQL engine takes a
.sqlor dump file and replays it into the existing database. Objects in the dump overwrite ones that already exist; anything not in the dump is left in place.
Because a restore can overwrite live data, take a backup first if you are not sure. See backups for how to snapshot before you import.
For a hosted DuckDB file that is too big to upload, query it in place from its URL:
CREATE OR REPLACE VIEW events AS
SELECT * FROM read_csv_auto('https://example.com/events.csv');