Skip to content
In this guide

Guide · Doing

Import

Read this when rows arrive as a file: an export from another system, a spreadsheet from a colleague, a fixture you keep in the repository. Import is Pro. On Free, Import data… carries the Pro badge and opens the upgrade panel.

Open an import

An import goes into one table, and opens in a tab of its own named after the file and the table, such as customers_oct.xlsx → customers. There are four ways in.

  • Right-click a table in the explorer and choose Import data….
  • In a table tab, open the more menu and choose Import data….
  • Drag a .csv, .tsv, .txt, .xlsx or .xls file onto a table in the explorer. The row lights up while the file is over it.
  • Open the command palette and run Import data…. It imports into the table tab in front, or the table selected in the explorer.

The footer of the tab is the step strip: File, Map, Check, Import. Each segment shows what its step settled, such as customers_oct.xlsx · Sheet1 · 48,213 or ✓ 48,101 · ✕ 112. Click a segment to go back to it. The last segment is the next action. Changing the file or the mapping drops the check, so the strip sends you through Check again.

Read the file

  1. Click Choose file…, unless you dropped one.
  2. For a workbook, pick the sheet. Each one shows its rows and columns.
  3. Check the header. Header is Row 1 by default. Click a row number in the preview to make that row the header, or choose None and the columns are named A, B, C.
  4. Set how values read. NULL is the text that means NULL besides an empty cell, such as \N. Empty text decides whether an empty cell in a text column is NULL or ''. Dates is the day and month order of dates written with slashes.

Seqora detects a text file's delimiter and encoding: UTF-8, UTF-8 with a BOM, UTF-16 or Windows-1252. Delimiter and Encoding override both. Dates are read from the first rows: a value like 14/09/2026 settles DD/MM/YYYY. When every date fits both orders, Seqora follows your system's locale and marks Dates with ▲.

Map the columns

Map lists the file's columns, three sample values each, and the table column each one fills.

  • Match is Name at first. Names match without case, spaces or punctuation, so Customer ID finds customer_id, and a name that starts or ends with the other finds it when nothing else does. Order maps the first column to the first column. Changing any row makes it Manual.
  • Choose skip to leave a file column out.
  • Read as changes a value on the way in: trim, × factor (cents from dollars is × 100), or empty → a value for empty cells. Date and enum columns show what they will read, such as DD/MM/YYYY or enum · 6 of 6.
  • Table columns no file column fills are listed under the file's columns with ←. Type a value there and every row gets it. A NOT NULL column without a default shows ✕ required until it has one.

Rows decides what happens to rows already in the table.

Rows Does
Append Inserts every row. A duplicate key is a reject.
Upsert on id Inserts new keys and updates existing rows. The key is the primary key, or a unique key you pick.
Replace all Deletes the table's rows, then inserts the file, in one transaction.

Check every row

Check reads the whole file and converts every value to its column's type before anything is written. The grid shows the first 200 rows as they will be stored, under the table's columns. Each column header has a bar of valid, empty and bad values and a count, ✕ 61 or ✓. Bad cells are hatched. ✕ 112 bad rows shows only the rows with a problem, as the file holds them.

The right side holds the rest of the decisions:

  • Bad rows: Stop writes nothing if one row is bad. Skip leaves bad rows out and keeps them as rejects. → NULL loads a bad value as NULL where the column allows it.
  • Commit: All at once is one transaction. Every 5,000 commits as it goes, so a failure keeps the rows committed before it. Replace all is always one transaction.
  • The counts: + insert, ~ update for an upsert, ✕ skip, and how long the check took.
  • Bad by reason: date not DD/MM/YYYY, not in region_t, repeats in file, with the column. When the bad dates read in the other order, Read as MM/DD/YYYY switches and checks again.

Changing Rows or Bad rows checks again.

Import

Click Import 48,101 rows in the strip. On a production connection the tab shows PROD, the button turns red and Seqora asks before writing. Replace all always asks. A locked connection shows Writes locked and Unlock: the check runs, the import doesn't.

PostgreSQL loads with COPY into a staging table and inserts or upserts from there. MySQL and MariaDB use batched multi-row INSERT, and SQLite prepared statements in a transaction. A batch the database refuses is split until the refused rows are found. With Skip they become rejects carrying the database's message.

The result is a flow from the file to the table: a band for the rows inserted, one for the rows updated, and a thin band for the rejects that drops into the list below. The table shows its rows now and what it had before. Hover a band for its exact count.

  • Undo import deletes the rows the import inserted and puts back the old values of rows it updated. It isn't there after Replace all.
  • Open customers opens the table.

Fix the rejects

Rejects lists one row per bad value: line, column, value, reason and fix. The chips above filter by column.

  1. Type the right value in fix. Type NULL for NULL. Esc clears a fix.
  2. Or apply a fix to many rows from the buttons below. Fix 24 · read as MM/DD/YYYY rewrites dates written in the other order. Map Europe → EU-West · 24 gives every Europe an enum label. With a column chosen, region → NULL empties its bad values.
  3. Click Import 2 fixed. The rows that load leave the list. The ones that fail again stay, with their new reason.

Save 112 as rejects.csv writes every reject with its line and reason, for whoever sent the file. Closing the tab forgets the rejects and the undo.

Caveats

  • Import reads CSV, TSV and Excel. JSON and Parquet don't import.
  • An import fills an existing table. It doesn't create one from the file.
  • Upsert needs a primary or a unique key.
  • The rejects list holds the first 10,000. Save as rejects.csv writes them all.
  • An import tab isn't restored after a restart.

Last checked against Seqora 0.4.6, PostgreSQL 17 on .

Bugs and small complaints both go to this address. I read every email myself.