See the supported connectors for Application Integration.

TO_SET function

TO_SET function

Function Name Description Usage Input parameter Return value
TO_SET Removes duplicate values in an array. TO_SET() N/A An array with unique values.

Supported data type

The TO_SET function supports the following data types:

  • Boolean array
  • Double array
  • Integer array
  • String array

Example 1: Get unique values of a string array

Sample data: $var1$ = {"Hello","World","Apigee","World"}

Usage: $var1$.TO_SET()

Get unique values in var1.

Output: {"Hello","World","Apigee"}

Example 2: Get unique values of an integer array

Sample data: $var1$ = (2,6,9,12,6,8,10,6,12)

Usage: $var1$.TO_SET()

Get unique values in var1.

Output: 2,6,9,12,8,10

Recommendation