CSV¶
The CSV node processes a CSV file.
Typically, 1 CU of resource can process a 100M CSV file.
Node Type¶
Action.
Input and Output Ability¶
This node has multiple entry points and 1 exit point. The input must be a single CSV file and the output is a JSON array.
Node Properties¶
Name
The name for this node.
Method
The method that the node uses to process the CSV file. Currently, the following option is available.
Decode: Convert the CSV file into a JSON array.
No. of Header Rows to Ignore
The number of lines from the top of the CSV file to ignore when processing. The first unignored row will be used as the key in the JSON output.
Header
You can choose whether you want to use the default header from the CSV file or create a custom header. The default header is usually the first row of records in the CSV file. If you prefer to have a custom header, you must define your custom header in the box provided.
Delimiter
In order to identify where each field begins and ends in the file, the fields must be separated (delimited) with a character such as a comma (,). You can either choose a delimiter from the drop-down list or define your own by choosing Other. The comma is used as the default delimiter.
Description
The description for this node.
Test CSV File¶
You can upload your CSV file to see the output sample. Click the Test tab, upload a CSV file, and click the Test button.
The maximum test file size is 2M.
Limitations¶
Maximum node entry points: 100
Maximum file size: 100M
Maximum test file size: 2M
Samples¶
Input Sample¶
A CSV file containing the following information:
assetId, timestamp, temperature, humidity
abc,24214324324,22.4,78
bcd,24214324324,54.4,43
Output Sample¶
[
{
"assetId":"abc",
"timestamp":24214324324,
"temperature":22.4,
"humidity":78
},
{
"assetId":"bcd",
"timestamp":24214324324,
"temperature":54.4,
"humidity":43
}
]