...
If the arrays are of different length, then null values are inserted for combinations where one array is missing a corresponding value.
D s | ||
---|---|---|
|
Array literal reference example:
D code |
---|
derive type:single value:ARRAYZIP([["A","B","C"],["1","2","3"]] ) |
Output: Generates Generates a nested array combining elements from the two source arrays.
Column reference example:
D code |
---|
derive type:single value:ARRAYZIP([array1,array2]) as:'zippedArray' |
Output: Generates Generates a new zippedArray
column column containing a single nested array pairing the elements of the array in the listed order of the arrays.
D s | ||
---|---|---|
|
D code |
---|
derive type:single value:ARRAYZIP(array_ref1,array_ref2) |
Argument | Required? | Data Type | Description |
---|---|---|---|
array_ref1 | Y | string or array | Name of first column or first array literal to apply to the function |
array_ref2 | Y | string or array | Name of second column or second array literal to apply to the function |
D s lang notes |
---|
array_ref1, array_ref2
...
D s | ||
---|---|---|
|
Example - Simple ARRAYZIP exampleARRAYZIP example
Source:
Item | Letters | Numerals |
---|---|---|
Item1 | ["A","B","C"] | ["1","2","3"] |
Item2 | ["D","E","F"] | ["4","5","6"] |
Item3 | ["G","H","I"] | ["7","8","9"] |
...
Include Page EXAMPLE - Flatten and Unnest Transforms EXAMPLE - Flatten and Unnest Transforms
D s also label nested