Skip to main content
Zequel provides powerful import and export features for moving data in and out of your databases. Import data from CSV and JSON files, and export query results or entire tables to multiple formats.

Exporting Data

Export Formats

Zequel supports three export formats:
Comma-Separated Values — universally compatible spreadsheet format.
  • Configurable delimiters: comma, semicolon, tab, pipe
  • Optional headers row
  • NULL handling: export as empty string or “NULL”
  • Perfect for Excel, Google Sheets, data analysis tools

Export Query Results

Export the results of any query:
1

Run Query

Execute a query in the Query Editor to populate the results grid.
2

Click Export

Click the export button in the status bar (or right-click → Export Data).
3

Choose Format

Select CSV, JSON, or SQL from the tabs.
4

Configure Options

Set format-specific options (delimiter, headers, pretty print, etc.).
5

Save File

Choose a destination and filename. Click Export to save.
Query result exports are limited to the rows returned by your query. Use LIMIT or filters to control the dataset size.

Export Table Data

Export all rows from a table:
1

Open Table

Open a table in the Data Grid view.
2

Full Table Export

Click the export button in the status bar. This exports all rows, not just the current page.
3

Configure Format

Choose CSV, JSON, or SQL and set options.
4

Stream Export

Zequel streams rows directly from the database to the file, handling millions of rows efficiently.
Exporting large tables (millions of rows) can take several minutes. The export runs in the background.

Export Current Page

Export only the rows visible in the current Data Grid page:
1

Right-Click in Grid

Right-click anywhere in the Data Grid.
2

Select Export Page

Choose Export Page from the context menu.
3

Configure and Save

Select format, set options, and save the file.
Useful for exporting a filtered subset or the first N rows.

CSV Export Options

  • Delimiter: Choose comma, semicolon, tab, or pipe
  • Include Headers: Add column names as the first row
  • NULL as Empty: Export NULL values as empty strings (blank cells) or the literal text “NULL”
Example CSV Output:
id,name,email,created_at
1,Alice,[email protected],2024-01-15 10:30:00
2,Bob,[email protected],2024-01-16 14:22:00

JSON Export Options

  • Pretty Print: Format JSON with indentation for readability
Example JSON Output (pretty-printed):
[
  {
    "id": 1,
    "name": "Alice",
    "email": "[email protected]",
    "created_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": 2,
    "name": "Bob",
    "email": "[email protected]",
    "created_at": "2024-01-16T14:22:00Z"
  }
]

SQL Export Options

  • Include Schema: Qualify table names with schema (e.g., public.users)
  • Create Table: Add a CREATE TABLE statement before INSERT statements
Example SQL Output:
CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  name TEXT NOT NULL,
  email TEXT UNIQUE
);

INSERT INTO users (id, name, email) VALUES (1, 'Alice', '[email protected]');
INSERT INTO users (id, name, email) VALUES (2, 'Bob', '[email protected]');

Importing Data

Import Formats

Zequel supports importing from:
  • CSV: Comma-separated values with optional headers
  • JSON: Array of objects (one object per row)
SQL imports are not yet supported. Use the Query Editor to execute SQL files.

Import CSV or JSON

Import data into an existing table:
1

Open Table

Open the target table in the Data Grid view.
2

Start Import

Right-click in the grid → Import CSV or Import JSON.
3

Select File

A file picker opens. Choose the CSV or JSON file to import.
4

Preview Data

Zequel displays a preview of the first 10 rows with detected column names and types.
5

Configure Options

  • File has headers: Toggle if the first row contains column names
  • Delimiter (CSV only): Select comma, semicolon, tab, or pipe
  • Clear table before import: Truncate the table before inserting new rows
6

Map Columns

Click Continue to Mapping to map source columns to table columns.
7

Review Mapping

Each source column is auto-matched to a table column (by name). Adjust mappings or skip columns as needed.
8

Execute Import

Click Import X Rows to begin. Zequel inserts rows in batches of 100.
9

View Results

A summary shows the number of rows imported and any errors encountered.

Column Mapping

Zequel automatically maps columns by name (case-insensitive):
  • Auto-Matched: Columns with matching names are pre-selected
  • Skip Columns: Set a column’s target to “Skip column” to ignore it
  • Type Conversion: Zequel attempts to convert source values to the target column’s data type
Example: CSV columns: user_id, full_name, email_address
Table columns: id, name, email
Mapping:
  • user_idid
  • full_namename
  • email_addressemail

Import Options

File Has Headers

Toggle this option if your CSV/JSON file includes column names:
  • Enabled: First row is treated as headers and used for column mapping
  • Disabled: All rows are treated as data; columns are named Column1, Column2, etc.

Delimiter (CSV Only)

Select the character that separates columns:
  • Comma (,): Standard CSV format
  • Semicolon (;): Common in European locales
  • Tab: TSV (tab-separated values)
  • Pipe (|): Alternative delimiter

Clear Table Before Import

Enable this option to truncate the table before importing:
  • All existing rows are deleted
  • Auto-increment counters are reset (database-dependent)
  • New data is inserted into an empty table
Clear table before import permanently deletes all existing rows. Back up important data first.

Import Errors

If rows fail to import:
  • Type Mismatches: Source value cannot be converted to target column type (e.g., text → integer)
  • Constraint Violations: Primary key duplicates, unique constraint violations, NOT NULL violations
  • Foreign Key Errors: Referenced rows do not exist
The import summary displays up to 50 error messages. Successfully imported rows are committed even if some rows fail.

Batch Import Performance

Zequel inserts rows in batches of 100 for performance:
  • Small Files (under 1,000 rows): Import completes in seconds
  • Medium Files (1,000-10,000 rows): ~10-30 seconds
  • Large Files (over 10,000 rows): Several minutes; progress is shown
Importing millions of rows may take a long time. Consider using database-native tools (e.g., COPY for PostgreSQL, LOAD DATA for MySQL) for bulk imports.

Paste Rows from Clipboard

Quickly import data from Excel or Google Sheets:
1

Copy Rows

In Excel or Google Sheets, select rows including the header row. Press Cmd+C to copy.
2

Paste in Zequel

Open the target table in Zequel. Right-click in the Data Grid → Paste Rows (or press Cmd+V).
3

Column Matching

Zequel matches clipboard headers to table columns (case-insensitive) and inserts rows.
4

Refresh Grid

Rows are inserted immediately. Click Refresh to see them in the grid.
Supported Formats:
  • Tab-separated (TSV): Default copy format from Excel/Sheets
  • Comma-separated (CSV): If copied from a CSV file
Paste Rows is ideal for small datasets (up to 100 rows). For larger imports, use the Import CSV/JSON feature.

Use Cases

Export a table as SQL from one database and execute the SQL in another database to replicate the data.
Export production data as CSV, anonymize it, and import into a staging or development database.
Export query results as CSV or JSON and share with colleagues who don’t have database access.
Import customer lists, analytics exports, or third-party datasets from CSV/JSON files into your database.
Export critical tables as SQL for quick snapshots. Import the SQL to restore data.

Best Practices

Review the data preview and column mappings before clicking Import. Mismatched types can cause errors.
For databases supporting manual transactions, enable Manual Commit mode before importing to allow rollback on errors.
Always enable Include headers for CSV exports. It makes re-importing and analyzing the data much easier.
Before importing 100,000 rows, test with the first 10 rows to ensure column mappings and types are correct.
If using Clear table before import, export the existing data first as a backup in case you need to roll back.

Keyboard Shortcuts

ShortcutAction
Cmd+VPaste Rows from Clipboard
Cmd+EExport Current View

Troubleshooting

  • Check the data preview for mismatched types (e.g., text in a numeric column)
  • Adjust column mappings to skip problematic columns
  • Clean the source file to match the target table’s schema
  • Manually select the correct delimiter in the import dialog
  • Ensure the CSV file uses consistent delimiters throughout
  • Apply filters or a LIMIT clause to reduce the dataset before exporting
  • Use pagination to export in smaller chunks
  • Validate the JSON file syntax (use a JSON validator tool)
  • Ensure the file is an array of objects: [{...}, {...}]
  • Check that object keys match table column names

Build docs developers (and LLMs) love