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 |
Name | Type | Mandatory | Description |
---|---|---|---|
in | CSV | Mandatory | CSV data. |
Name | Type | Description |
---|---|---|
out | Array<T> (generic) | Array data. |
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 case | Parameters▼ | IN in |
OUT out |
|||
---|---|---|---|---|---|---|
case1_numbers | properties | in | (missing) | |||
failOnMissing=false |
||||||
case2_column | properties | in | (missing) | |||
keys=column, |
||||||
case3_filename | properties | in | (missing) | |||
keys=file, |
||||||
case4_missing_files | properties | in | (expecting failure) | |||
keys=file, |