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 r100

D toc

Excerpt

Generates an array containing all elements that appear in multiple input arrays, referenced as column names or array literals.

D s lang vs sql

D s
snippetBasic

Array literal reference example:

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

Code Block
["A"]

Column reference example:

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

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:arrayintersect(array_ref1,array_ref2)

arrayintersect(array_ref1,array_ref2)


ArgumentRequired?Data TypeDescription
array_ref1Ystring or arrayName of first column or first array literal to apply to the function
array_ref2Ystring or arrayName of second column or second array literal to apply to the function

D s lang notes

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.

D s
snippetusage

Required?Data TypeExample Value
YesArray literal or column referencemyArray1, myArray2

D s
snippetExamples

Example - Simple intersection example

Include Page
EXAMPLE - Nested Functions
EXAMPLE - Nested Functions

D s also
labelnested