CSV line writer
Generate a CSV file on which you can append multiple lines. The file is written line by line as records arrive (streaming), so it can produce large files without holding them in memory.
Each incoming row is an object keyed by spreadsheet column letter (A, B,
C…); cells are written in column-letter order. Cell values are converted to
text — empty, date, time, datetime, text, number and JSON values are
supported; other value types (boolean, list, object…) fail the run with an
"unsupported type" error.
Every row must have the same number of cells: the expected count is the number of configured headers or, without headers, the cell count of the first written row. A row with a different cell count fails the run.
# Example:
Input 1:
- CSV row: "A" -> "Apple" and "B" -> "30gr"
Input 2:
- CSV row: "A" -> "Ham" and "B" -> "12kg"
Output:
+--------+--------+
| A | B |
+--------+--------+
| Name | Weight |
+--------+--------+
| Apple | 30gr |
| Ham | 12kg |
+--------+--------+
Parameters
Which delimiter to use. Optional; the default is ,. It must be exactly
one character — a value of any other length is silently ignored and the
default is used instead.
Which quoting mode to use: Always / Necessary / Non Numeric / Never (default: Necessary).
Add an header line with the configured labels ('A' -> 'Name' and 'B' -> 'Weight' in example)
Input
The row to append, as an object keyed by column letter (A, B, C…).
Cells are written in column-letter order.