LOAD
Loads records from a source file into a table using safe, parameter-bound INSERT statements. Every value is bound through a JDBC PreparedStatement parameter, never concatenated into SQL text, and the target table/columns are resolved against real database metadata before any SQL is built. PREVIEW validates without writing; a plain LOAD asks for confirmation before writing (default No) unless running inside a script, where it requires EXECUTE instead. Any unrecognized source column, or any row that fails to convert, refuses the whole load; there is no partial load of only the valid rows.
Arguments
LOAD <table> <file> [PREVIEW | EXECUTE] where: <table> is a valid table name, optionally SCHEMA.TABLE <file> is the source CSV file (semicolon-separated by default; see CsvSeparator in BroadSQL.ini) PREVIEW validates and reports without writing or asking for confirmation EXECUTE authorizes the write immediately, without asking for confirmation (required inside a script) The legacy LOAD CREATE <table> <file> form is still accepted (CREATE is now the only mode, so it is optional)
Examples
LOAD CUSTOMER customer.csv
LOAD CUSTOMER customer.csv PREVIEW
LOAD CUSTOMER customer.csv EXECUTE
LOAD CRM.CUSTOMER c:\temp\customer.csv EXECUTE
Notes
LOAD <table> <file> [PREVIEW | EXECUTE] loads a CSV file into a table with INSERT, safely: every value is bound through a JDBC PreparedStatement parameter (never concatenated into SQL text), and the target table/columns are resolved and validated against database metadata before any SQL is built. See the Import guide for the workflow, CSV format, conversion rules and transaction caveats.
The legacy LOAD CREATE <table> <file> form still works unchanged (only INSERT exists now, so the mode keyword is optional and, when present, only CREATE is accepted; UPDATE is refused with an explicit migration message, see LoadCommandParser).
PREVIEW validates the source against the target (column mapping, per-value type conversion) and reports the outcome without writing anything or asking for confirmation. A plain LOAD runs the same preflight, then, if it passed, asks for confirmation before writing (default answer is No), unless it is running inside a @/LIB RUN script, in which case it refuses outright rather than blocking on a prompt nothing can answer; add EXECUTE to authorize the write immediately, interactively or from a script. Any preflight failure (an unrecognized source column, or any row that fails to convert) refuses the entire load; there is no partial/best-effort load of just the rows that happened to be valid.
The load is atomic: values are batched internally with JDBC addBatch()/ executeBatch() for efficiency, but nothing is committed until every batch has succeeded, and any failure rolls back everything already written in this command.
Last modified in release 5.2.10.
BroadSQL