Skip to main content
Skip table of contents

CSV Parser Node

Basic Information

Description

This node is use to extract data from csv files.

Input

Single or multiple files that are stored in instance metadata

Output

One table for every files

Usage Tags

CSV , READER , SOURCES


Node Settings

  • FilePath ( string, required) : A path to the file that will be processed

  • Separators (List<string>, required) : A list of separators that will be used to process the file.

  • Use Datatype ( bool, not required) : A boolean indicating if node tries to set data type to columns.

  • Included columns ( List<string>, not required) : A list of column names that will be included in resulting table. If empty all columns will be returned.

  • Regex filter ( string, not required) : A regex filter that will be applied on a file path. If match is successful then file will be processed.

  • Filename columns ( List<object>, not required) : A list of columns that will be extracted from file path. This is very useful when file path contains valuable information like the project name, experiment,…

    • Column Name ( string, required) : A name of the column that will be created.

    • Regex ( string, required) : A regex expression that must contain group. Regex will be applied on file path and resulting group will be extracted and stored in a generated column.

Csv reader node have a very general purpose. It can parse files based on multiple separators and can work in manual and automatic processes. It can handle files that are uploaded to process or automatically read from some directory.


Examples

Example 1: Parsing manually uploaded files

In this example the csv parser node will extract table from a csv file that was uploaded by user in one of previous steps.

Example json configuration
JSON
{
  "properties": {
    "filePath": "@filePaths[0]",
    "seperators": [
      ";"
    ],
    "useDataType": false,
    "includedColumns": [],
    "regexFileFilter": ".csv",
    "fileNameColunms": []
  }
}

Example 2: Parsing files that were read from directory

In this example multiple files were already read from some directory. The node will parse all of them and create one table for every file. It is usually useful to later make a single table from all extracted tables using Union node.

Example json configuration
JSON
{
  "properties": {
    "filePath": "@filePaths",
    "seperators": [
      ";"
    ],
    "useDataType": false,
    "includedColumns": [],
    "regexFileFilter": ".csv",
    "fileNameColunms": []
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.