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 1 entry point and 1 exit point. The input must be a single CSV file and the output is a JSON array.

Node Properties

../../_images/csv.png


Node Name

Required.

The name for this node.


Method

Required.

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

Required.

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

Required.

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

Required. Comma by default.

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.


Description

Optional.

The description for this node.

Limitations

  • Maximum file size: 100M

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
    }
]