Excerpt |
---|
Merges the elements of an array in left to right order into a string. Values are optionally delimited by a provided delimiter. |
Array literal reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:arraymergeelements(["A","B","C","D"],"-") |
---|
|
arraymergeelements(["A","B","C","D"],"-") |
Output: Returns the following String value: "A-B-C-D"
.
Column reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:arraymergeelements([myValues) as:myValuesMergedTogether' |
---|
|
arraymergeelements([myValues) |
Output: Generates the new myValuesMergedTogether
column containing all of the elements in the arrays in the myElement
column joined together without a delimiter between them.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:arraymergeelements(array_ref,my_element, [string_delimiter]) |
---|
|
arraymergeelements(array_ref,my_element, [string_delimiter]) |
Argument | Required? | Data Type | Description |
---|
array_ref | Y | array | Name of Array column, Array literal, or function returning an Array to apply to the function |
string_delimiter | Y | string | Optional String delimiter to insert between merged elements in the output String. |
array_ref
Name of the array column, array literal, or function whose elements you wish to merge.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String (column reference or function) or array literal | myArray1 |
string_delimiter
Optional string value to insert between elements in the merged output string.
Required? | Data Type | Example Value |
---|
No | String | "-" |
Example - Podium Race Finishes
Include Page |
---|
| EXAMPLE - ARRAYSLICE and ARRAYMERGEELEMENTS Functions |
---|
| EXAMPLE - ARRAYSLICE and ARRAYMERGEELEMENTS Functions |
---|
|