Up: Component summary Component

CSV2Array

Reads a CSV, and returns an array based on selected columns.

Version 1.1
Bundle builtin
Categories
Specialties generic
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Requires python
Source files component.xml CSV2Array.py
Usage Example with default values

Type parameters (generics)

Inputs

Name Type Mandatory Description
in CSV Mandatory CSV data.

Outputs

Name Type Description
out Array<T> (generic) Array data.

Parameters

Name Type Default Description
failOnMissing boolean true Fails the component if any of the files are not found.
fileColumn string "File" Column used for file names. Files must exist.
keyColumn string "Key" Column name if 'column' selected as keys method.
keys string "numbers" Method to create keys. 'numbers' will create the keys sequentially from 1... 'column' will use a column defined with keyColumn. 'file' will use the base name of the files. 'hash' creates an md5 hash based on the file contents.

Test cases

Test case Parameters IN
in
OUT
out
case1_numbers properties in (missing)

failOnMissing=false

case2_column properties in (missing)

keys=column,
failOnMissing=false

case3_filename properties in (missing)

keys=file,
failOnMissing=false

case4_missing_files properties in (expecting failure)

keys=file,
failOnMissing=true


Generated 2019-02-08 07:42:08 by Anduril 2.0.0