Skip to content

CSV and CSVIM Editors

Two complementary editors. The CSV editor manipulates *.csv files as a grid. The CSVIM editor manipulates *.csvim files, which are JSON import models that drive bulk CSV-to-database imports via the CsvimSynchronizer.

Components: editor-csv, editor-csvim.

CSV editor (*.csv)

Grid editor backed by AG Grid.

  • Headers - the first row is treated as a header by default. Toggle via the kebab menu (Disable Header / Enable Header).
  • Columns - right-click the column band to Add Column, Edit Column, or Delete Column. Column type can be set per column (string / number / boolean / date).
  • Rows - right-click any cell to Add Row Before / After or Delete Row(s). Multi-select via Shift + click or Cmd/Ctrl + click; drag the row handle to reorder.
  • Filtering - per-column filters: Contains, Not Contains, Equals, Not Equal, Starts With, Ends With.
  • Delimiter and quote - configured per file in the kebab menu. Supported delimiters: ,, \t, |, ;, #. Supported quote characters: ', ", `.
  • Export - downloads the current view as CSV.

CSVIM editor (*.csvim)

A *.csvim file is a JSON document - an array of file-to-table import descriptors.

json
{
    "files": [
        {
            "table": "CUSTOMERS",
            "schema": "SALES",
            "file": "/sales-data/customers.csv",
            "header": true,
            "useHeaderNames": true,
            "delimField": ",",
            "delimEnclosing": "\"",
            "distinguishEmptyFromNull": true,
            "upsert": true
        }
    ]
}

The editor exposes each field as a form input.

FieldRequiredNotes
tableyesTarget table. Letters, digits, -, ., _, $.
schemayesTarget schema. Same character set as table.
fileyesRepository path to the *.csv source, e.g. /workspace/csv/data.csv.
headernoIf true, the first CSV row is treated as a header.
useHeaderNamesnoMatch CSV header names to table columns. Requires header: true.
delimFieldnoField delimiter. One of ,, \t, `
delimEnclosingnoQuote character. One of ', ", `.
distinguishEmptyFromNullnoIf true, quoted empty strings are imported as empty; unquoted empties become null.
upsertnoIf true, existing rows matched by primary key are updated; otherwise rows are inserted.
versionnoFree-form version string for change tracking.

Synchronizer

CsvimSynchronizer reconciles *.csvim artefacts. On change, it loads the referenced *.csv files and runs the import against the configured data source. See artefacts for the full data-artefact set.

Released under the EPL-2.0 License.