Skip to main content

Import & Export

Export data in five formats (CSV, JSON, SQL, MQL, XLSX), import SQL, JSON, and CSV files (gzip supported for SQL), and paste tabular data from the clipboard into the grid.

Export Data

  1. Open a table, or run a query and use its results
  2. Click Export in the toolbar (Cmd+Shift+E), or right-click the results grid and choose Export Results…
  3. Choose a format, select tables in the tree view, configure options
  4. Click Export
TablePro remembers the last format and options you exported with. Option changes stick only after a successful export; cancelling the dialog discards them. Reset to Defaults under the options restores the stock settings for the current format.
MongoDB: SQL export is not available. Use MQL, which generates db.collection.insertMany([...]) scripts for mongosh. Redis: SQL and MQL exports are not available.
Export dialog

Export dialog

Export Formats

Streaming Export

Whole-table exports stream rows from the database straight to disk:
  • Constant memory regardless of table size, no row-count limit
  • Atomic write: the destination file appears only on success, partial files are removed on failure
  • Cancellable from the progress dialog; cancelling removes the partial file
Result-grid exports use the in-memory result set. Use LIMIT in your query to control their size.

Clipboard Paste (CSV/TSV)

Paste tabular data directly into the data grid. Press Cmd+V after selecting a row. Format is auto-detected: tabs parse as TSV, commas as CSV.

Import Data

Import .sql and .sql.gz files (statements execute directly against your database: backups, migrations, seed data), .json / .jsonl files into a table, or .csv / .tsv files into a table with column mapping.

Import SQL

1

Open Import Dialog

Click File > Import > From SQL (Cmd+Shift+I).
2

Configure Options

Set encoding, transaction wrapping, and foreign key check options. TablePro remembers the options from your last successful import; cancelling the dialog discards changes, and Reset to Defaults restores the stock settings.
3

Preview and Import

Review the SQL preview, statement count, and file size. Click Import to execute.
Import dialog

Import dialog with SQL file preview

Import Options

For PostgreSQL the checkbox runs SET session_replication_role = replica, which requires superuser (or, on PostgreSQL 15+, a GRANT SET on the parameter). If the server rejects the statement, the import stops with that error; uncheck the option to proceed. TablePro’s SQL exports emit foreign key constraints with ALTER TABLE ... ADD CONSTRAINT after data load, so the dump imports in order without needing the privilege. For MySQL the checkbox runs SET FOREIGN_KEY_CHECKS = 0 and works on standard accounts. SQLite uses PRAGMA foreign_keys = OFF. Drivers without an equivalent (most NoSQL drivers) ignore the option.

Error Handling Modes

In Skip and Continue mode, failed statements are collected (up to 1,000) with line numbers and error messages. After import completes, a summary shows how many succeeded vs failed, with a scrollable error list and a Copy Errors to Clipboard button.

Import JSON Data

Choose File > Import > From JSON and pick a .json, .jsonl, or .ndjson file. The sheet accepts an array of objects [{...}, {...}], newline-delimited JSON (one object per line, streamed for large files), and TablePro’s own JSON export shape { "table": [ {...} ] }, so an export round-trips back in. Choose a destination:
  • Existing table: pick the table, then map each JSON field to a column. Fields are auto-matched by name; toggle any field off to skip it, or remap it. Columns with no matching field keep their default or NULL.
  • New table: name the table and review the columns TablePro infers from the data. Each column’s name, type, primary key, nullable flag, and default are editable before the table is created.
Rows insert through parameterized statements, so JSON values are never concatenated into SQL. Nested objects and arrays are stored as JSON text.

Import CSV Data

Choose File > Import > From CSV and pick a .csv or .tsv file. TablePro opens the same row import sheet used for JSON, with CSV-specific parsing options. The delimiter and encoding are auto-detected; the quote character defaults to a double quote. Change any parsing option and the field mapping re-reads the file. Destination options match JSON import: map into an existing table or create a new one. Quoted fields keep embedded commas and newlines (RFC 4180), and doubled quotes ("") decode to a single quote.

Row Import Options

CSV and JSON imports insert rows in batches through parameterized statements. The on-error and transaction options work the same as SQL import. They add one option of their own: Delete existing rows before import, which clears the target table first. The delete runs inside the import transaction, so a failed import in the default Stop and Rollback mode restores the deleted rows. During import, a progress bar shows rows processed and overall completion.