7. Data transfer
7.1 Import CSV, JSON and Excel
Data > Import CSV/JSON... loads a file into a table.

Import: preview
- Choose the file and its format (CSV, JSON, Excel with sheet selection), separator, header row and encoding (UTF-8 / ANSI); Preview shows the first rows.
- Choose the target table, or New table (create from file) to create it from the file columns (the New table (DDL) tab shows the proposed
CREATE TABLE). - Check the Column mapping: each file column goes to a target field (empty = skipped), with the suggested type. Map by name matches by name.
- Options: Empty = NULL, Truncate table first, Commit every N rows. Press Import; the Log tab reports the result.

Import: column mapping
Saved mappings: after every successful import the mapping (table, file columns, options) is saved and proposed again the next time the same file layout is used, even partially (new columns are marked NEW column - check). Named mappings can be saved, applied and deleted from the Saved mapping bar. Mappings are stored in transfer-mappings.json in the data folder.
7.2 Export
Export is available from the results grid (Export... button and context menu), from the Data tab of a table and from Data > Export selected table.... Formats:
- CSV (separator of your choice), Excel (
.xlsx), JSON, XML; - SQL script:
INSERT,UPDATE,UPDATE OR INSERTorDELETE, with the key fields of your choice.
At the end SmartFBX opens the folder with the file selected and the file itself with its default application. Table name, key fields, format, separator, folder and file name are remembered per table.
7.3 Compare and pump table data
Data > Compare / pump table data... compares the rows of a source with a target table, also between different connections, and synchronises them.

Data compare: setup
- Source: a table or view, or a free
SELECT; optionalWHEREfilter. Read columns loads the columns of a query. - Target: connection, table, filter and key fields (Primary key fills them from the table).
- Column mapping: for each target field, a source column or an SQL expression/constant evaluated on the source database. Double-click a source column in the list on the right to assign it; Map by name matches by name. Mappings are saved like import mappings.
- Compare fills the Differences tab: rows missing in the target, changed rows (source value with the target value in brackets) and rows only in the target.
- Apply to target executes the
INSERT,UPDATEandDELETEstatements according to the options; Generate script writes them as SQL instead (save, open in the SQL editor or run with the script runner). - Options: Insert missing rows, Update changed rows, Delete rows only in target, Stop at first error, Commit every N, Disable table triggers while loading, Set generator to the maximum of a column.
In the example the source query raises the price of peripherals by 5%: the comparison shows the two changed rows before anything is written.

Data compare: result