Converts between the two possible representations of a relations with multivalued columns. By default this component splits rows with multivalued (comma separated lists) columns into multiple rows each representing a single value. All permutations of column values are shown as single-valued rows. The input may contain several columns with comma separated values and all permutations of column values are shown as individual single-valued rows. The alternative mode recovers the original comma separated values from the expanded relations. This is performed by joining values of the their list columns into comma separated lists.
Version | 1.4 |
---|---|
Bundle | tools |
Categories | Convert |
Authors | Marko Laakso (Marko.Laakso@Helsinki.FI) |
Issue tracker | View/Report issues |
Source files | component.xml |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | CSV | Mandatory | The mandatory input relation |
Name | Type | Description |
---|---|---|
out | CSV | Converted version of the input data |
Name | Type | Default | Description |
---|---|---|---|
delim | string | "," | Value delimiter between the list column values. Special characters can be encoded as specified in org.anduril.asser.ArgumentEncoding. |
duplicates | boolean | false | Allow duplicate values in list columns |
expand | boolean | true | Action mode that is expand (true) or collapse (false) |
listCols | string | "*" | A comma separated list of column names of input (expand) or output (collapse) columns that may contain delim separated values. The asterisk refers to every column of the input relation. |
maxPerms | int | 10000 | A safety limit for the maximum number of output rows produced by the expansion of an individual input row. The component fails if this limit is exceeded. |
Test case | Parameters▼ | IN in |
OUT out |
|||
---|---|---|---|---|---|---|
case5 | properties | in | (expecting failure) | |||
maxPerms = 100 |
||||||
collapse1 | properties | in | out | |||
listCols = col2,col4, |
||||||
collapse2 | properties | in | out | |||
listCols = col2,col4, |
||||||
expand1 | (missing) | in | out | |||
expand2 | properties | in | out | |||
listCols = col2, col5,col4 |
||||||
expand3 | properties | in | out | |||
delim = ; |
||||||
expand4 | properties | in | out | |||
listCols = , |