SQL row exchange
SQL expressions, sql_values data and sql_insert output serve different purposes. Choose according to whether the source should be executed as SQL or decoded as row literals.
Literal input
Use INSERT VALUES for ordinary SQL expressions and literals. Use INSERT FORMAT sql_values when the source contains comma-separated literal rows.
The sql_values codec does not evaluate arbitrary expressions. It decodes the supported literal representations and validates them against the destination schema.
Executable output
sql_insert writes INSERT statements for a chosen table and is output-only. Run the resulting text as SQL when importing it; it is not an input codec.
SELECT 1 AS id, 'Ada' AS name
SETTINGS sql_insert_table = 'people'
FORMAT sql_insert;INSERT INTO people (`id`, `name`) VALUES (1, 'Ada');The setting applies to this statement only. The target table must exist with a compatible schema when the generated SQL is later executed.
See sql_values, sql_insert and INSERT INTO.