Network expressions
New operators
In this release, the following operators are now supported:
-
UNION
-
UNION (ALL)
-
INTERSECT
These functions provide Data Managers with more flexibility to combine and filter data collections, enabling them to tailor data for specific use cases.
This enhancement is enabled by default in your Network instance.
UNION operator
UNION operator is used to combine the result set of two or more collections.
Usage
<collection> UNION <collection>
Example
[ "foo", "star", "ball", "app" ] UNION [ "foo", "bar", "fox", "app" ]
Result
[foo, star, ball, app, bar, fox]
The UNION operator selects only distinct values by default. To allow duplicate values, use UNION ALL.
UNION ALL
Use to combine all result sets of two or more collections.
Usage
<collection> UNION ALL <collection>
Example
[ "foo", "star", "ball", "app" ] UNION ALL [ "foo", "bar", "fox", "app" ]
Result
[foo, star, ball, app, foo, bar, fox, app]
INTERSECT
Use to combine values in the result set that are common to both collections.
Usage
<collection> INTERSECT <collection>
Example
[ "foo", "star", "ball", "app" ] INTERSECT [ "foo", "bar", "fox", "app" ]
Result
[foo, app]