2.4. Import data
To import table data from an external file, right-click on a table in Project Explorer and choose Import data from CSV.
You will first be prompted to select a file, and then the import window opens.
Supported formats: CSV and TSV. The file must be encoded in UTF-8. Supported delimiters are semicolon (;
), comma (,
), and tab.
The import is strictly insert-only. If you need to clear the table before importing, do it manually. Primary keys are not required, but column names in the file must match the table columns exactly.
Preview
The import window shows a preview of the first 10 rows of the file.
- Delimiter and First line is header are detected automatically when the file is opened.
- Detection is not always perfect, so you can adjust them manually.
- The preview updates immediately when you change these options.
This helps ensure column alignment before starting the import.
Batching
Import is streaming and does not load the whole file into memory. Rows are read in batches and inserted into the database.
- Default batch size: 10 rows
- Presets: 10, 100, 1000
- Custom value: you can enter any number
Each batch is executed as a single insert operation. If the database reports an error (e.g., constraint violation), the import stops immediately. Already inserted rows are not rolled back.
Progress
During import, a progress bar indicates that the process is running. Since the file is not pre-loaded, the total number of rows is unknown, so the progress bar does not show percentage completion.
The progress window has a Cancel button. If pressed, the process stops with the message Cancelled by user. The window remains open so you can review the status or error message.