Excerpt |
---|
Generates an array containing all elements that appear in multiple input arrays, referenced as column names or array literals. |
Array literal reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:arrayintersect([["A","B","C"],["A","D","E"]] ) |
---|
|
arrayintersect([["A","B","C"],["A","D","E"]] ) |
Output: Returns a single array with a single element:
Column reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:arrayintersect([array1,array2]) as:'intersect_Array' |
---|
|
arrayintersect([array1,array2]) |
Output: Returns a single array listing all of the elements that appear in both array1
and array2
in order.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:arrayintersect(array_ref1,array_ref2) |
---|
|
arrayintersect(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 |
array_ref1, array_ref2
Array literal or name of the array column whose intersection you want to derive. You can intersect two or more array columns together.
Required? | Data Type | Example Value |
---|
Yes | Array literal or column reference | myArray1 , myArray2 |
Example - Simple intersection example
Include Page |
---|
| EXAMPLE - Nested Functions |
---|
| EXAMPLE - Nested Functions |
---|
|