The parsing options
Optional Readonlyheader?: booleanReads the first row of each document as column labels, keying records by label rather than by
positional index; defaults to false
Optional Readonlyskip?: booleanSkips lines without content, either empty or containing delimiters only; a row with at least one
non-blank field is kept; defaults to false
Optional Readonlytrim?: booleanStrips surrounding whitespace from field values and column labels, quoted values included; a
field left blank after trimming is undefined rather than an empty string; defaults to false
Optional Readonlyflex?: booleanEmits records whose field count doesn't match the header rather than skipping them; missing
fields are left out and fields beyond the header are discarded; 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 feed of CSV documents, given as text or as responses, into a feed of records
Error While the feed is consumed, if the source feed fails or a response body can't be read
Creates a CSV parser.
The task converts a feed of CSV documents into a feed of records, one Record per data row, so that downstream tasks work on structured data rather than on text.
Each document is given either as text or as a response carrying it in its body. A response without a body produces no records.
Response bodies are decoded with the
charsetparameter of their content type. If no charset is stated, bodies are decoded as UTF-8 rather than as the US-ASCII default oftextmedia types, since UTF-8 is the encoding CSV sources use in practice. A leading byte order mark is stripped, both from text and from bodies in a Unicode charset.Sources often serve CSV as
text/plainor under vendor types. A response with a content type other thantext/csvorapplication/csvis therefore logged as a warning and parsed anyway. A response with a charset the platform can't decode is also logged, and its body is decoded as UTF-8.Malformed records are skipped and logged as warnings, and the feed runs to completion.