Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r095

D toc

Excerpt

Merges the elements of an array in left to right order into a string. Values are optionally delimited by a provided delimiter.

D s lang vs sql

D s
snippetBasic

Array literal reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive 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
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive 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 s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:arraymergeelements(array_ref,my_element, [string_delimiter])

arraymergeelements(array_ref,my_element, [string_delimiter])


ArgumentRequired?Data TypeDescription
array_refYarrayName of Array column, Array literal, or function returning an Array to apply to the function
string_delimiterYstringOptional String delimiter to insert between merged elements in the output String.

D s lang notes

array_ref

Name of the array column, array literal, or function whose elements you wish to merge.

  • Multiple columns and wildcards are not supported.

D s
snippetusage

 

Required?Data TypeExample Value
YesString (column reference or function) or array literalmyArray1

string_delimiter

Optional string value to insert between elements in the merged output string.

D s
snippetusage

 

Required?Data TypeExample Value
NoString"-"

D s
snippetExamples

Example - Podium Race Finishes

Include Page
EXAMPLE - ARRAYSLICE and ARRAYMERGEELEMENTS Functions
EXAMPLE - ARRAYSLICE and ARRAYMERGEELEMENTS Functions

D s also
labelnested