The parsing options
Optional Readonlyheader?: booleanReads the first row as column labels, keying records by label rather than by positional
index; defaults to false
Optional Readonlyskip?: booleanIgnores empty lines rather than reporting them as records; defaults to false
Optional Readonlytrim?: booleanStrips surrounding whitespace from field values; defaults to false
Optional Readonlyflex?: booleanReports records whose field count doesn't match the header, leaving out missing fields and
discarding fields beyond the header, rather than skipping them; defaults to false
Optional Readonlyquote?: stringThe character wrapping field values; defaults to " if unset or empty
Optional Readonlydelimiter?: stringThe character separating fields; defaults to , if unset or empty
A task converting a stream of CSV text or byte chunks into a stream of records
Creates a CSV parser.
The generated task reads CSV text and byte streams as streams of records, one Record per data row.
Chunks are pulled from the source as records are asked for, so sources of any size are handled without holding them in memory and a consumer that stops early releases the source; some chunks are nonetheless read ahead of the records actually consumed, and a source reporting the whole text at once is parsed in one go.
Records that cannot be parsed are skipped and reported to the log, leaving the stream to run to completion.