Raft DB Studio

Import and export

The import wizard and the export from the Studio, with the limits of the import endpoint.

Both were added in round 2 of ST2.

Import#

The wizard takes a file (CSV, JSON, NDJSON), shows a preview with types, asks for the key column, then sends chunks of under 1 MB to the table's import endpoint with a progress bar and Cancel. Lines that fail are listed.

The endpoint (POST /v1/databases/{db}/tables/{t}/import) takes an NDJSON body with one {"key","document"} per line, under 1 MiB and 20,000 lines, and answers when the data is durable:

{imported, failedCount, failed:[{line, error}]}

Checked in Chrome: a 2,501-line NDJSON file gave 2,500 imported and 1 failed line, listed. Seeding a 120,000-row table through the endpoint took 1.2 s (a single manual run, not a benchmark).

Export#

Export pages through the table and writes NDJSON, a JSON array or CSV, with progress and Cancel. For a file opened in the file viewer, export writes the filtered rows (Viewing files).

Not verified#

The column chooser and Export were not clicked in the browser checks of round 2.

Not supported yet#

  • Import wizard steps for relations and keys, and a schema-aware type editor.
  • Parquet export (listed as "later" in the plan).

See also#