The CSV Read component takes CSV data as input, parses it and creates an output payload in the format specified by the Output Format component property (
CSVRead has an “Input” property (
cp.Input), which allows you to select the data source. If you select [Payload], the input payload (
cv.Payload) from the previous component is used as the source data of CSV, and if you select [File], the file specified by the [File name] property (
cv.Filename) is used as the source data of CSV.
If the input payload (
cv.Payload) is a byte sequence or a string, it becomes the source data of CSV as it is, but for other types, it is converted to a string and processed as the source data of CSV.
If “Array” is selected for the “Output Format” component property (
cp.Output), an array of strings of CSV fields is put into the output payload (
cv.Payload) for each line of the CSV and passed to the next component.
If you select “Object” in the “Output Format” component property (
cp.Output), the first line of the CSV is considered as the key, and a JSON Object is generated, and the object is put into the output payload for each function and passed to the next component.
|Input||True||Specify either payload or file for input. To set the value of cp.Input, use either “Payload” or “File”.|
|Filename||False||Specify the filename for file input|
|Encoding||False||Specify the encoding of the file output|
|Output||True||Specify either array or object as the output format. cp.Output value can set “Array” or “Object”.|
|Start||False||Specify the start line to read as CSV data|
|Length||False||Specify how many lines to read. If -1 is specified, read all lines.|