Skip to content

CSV Import

Import CSV files into any view with a visual field mapping dialog. Map CSV columns to view fields, preview records before importing, and save mapping configurations for repeated use.

Opening the Import Dialog

There are two ways to start an import:

  • Toolbar — click the Import button in the top toolbar
  • File menu — click File > Import Data

The Import button is only enabled when the current view allows adding rows.

Upload

Select a .csv, .tsv, or .txt file. The dialog scans the file to detect columns and count rows without loading the entire file into memory — files up to 100 MB are supported.

Field Mapping

After selecting a file, the mapping table shows:

ColumnDescription
CSV FieldsValues from the current record, numbered by CSV column position
Table Target FieldsView column name with data type badge (e.g. VARCHAR(255)) and constraint badges (PRIMARY, UNIQUE)

Auto-Mapping

Columns are automatically matched by name:

  1. CSV header matches view column display name (case-insensitive)
  2. Fallback: matches field name (camelCase API name)
  3. Fallback: matches database column name (snake_case)

Unmapped columns show Default: <null> and are skipped during import.

Manual Mapping

Click any CSV cell to open a dropdown and reassign the CSV column for that row. Select to unmap.

Record Browser

Use the < > paginator at the bottom to browse through records and verify that CSV values land in the correct columns.

Options

OptionDescription
First line contains field namesWhen checked, the first CSV row is used as column headers for auto-mapping. When unchecked, columns are mapped by position.
Import MethodINSERT creates new rows. UPDATE updates existing rows (requires primary key mapped).
Align field names byControls CSV column ordering: File order (original position) or Alphabetical (sorted by header name).

Column Handling

Column TypeImportable?Notes
Regular columnsYesUser provides values
UUID primary keyYesMap from CSV or leave blank for auto-generation
Auto-increment primary keyNoDatabase generates automatically
FK columns (with edit mode)YesProvide the foreign key value
Relationship display columnsNoRead-only joined data
Computed / formula columnsNoCalculated at query time
Auto-set timestampsNoCreated/updated timestamps are generated automatically
Display groupsExpandedIndividual member columns shown separately

Saved Mappings

Save a mapping configuration by entering a name and clicking Save above the mapping table. Saved mappings can be loaded from the dropdown when importing the same CSV structure again.

Mappings are saved per view. Visibility can be Private (only you) or Shared (all view members).

Import Execution

Click Import to start. Rows are sent in batches of 500 to the server. A progress bar shows batch progress, success count, and error count.

If errors occur, individual row errors are listed with row numbers. Click Export Errors CSV to download a CSV file with all error details.

API Endpoint

The bulk insert endpoint can also be called directly:

POST /api/data/bulk/{viewUuid}/insert

Request body:

json
{
  "rows": [
    { "name": "Angola", "code": "AO" },
    { "name": "Argentina", "code": "AR" }
  ]
}

Response (201):

json
{
  "viewUuid": "abc-123",
  "totalCount": 2,
  "successCount": 2,
  "failureCount": 0,
  "errors": []
}

Maximum 1000 rows per request. Field names use the camelCase API field names (same as the single-row insert endpoint).

SchemaStack Documentation