Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

COLLECT_LIST

COLLECT_LIST

Returns an array with elements based on the argument. The data type of the argument determines the data type of the array. COLLECT_LIST is an aggregate function.

Syntax

COLLECT_LIST(value as any)
The following table describes the arguments for this command:
Argument
Required/Optional
Description
value
Required
Any data type. The values that you want to aggregate into a hierarchical data of type array. You can enter any valid transformation expression.

Return Value

Array.

Group By

COLLECT_LIST groups values based on group by ports you define in the transformation, returning one result for each group.
If there is no group by port, COLLECT_LIST treats all rows as one group, returning one value.

Examples

The following expression returns an array with the elements in the PRODUCT_NAME.
COLLECT_LIST(PRODUCT_NAME)
PRODUCT_NAME
Flashlight
Compass
Pressure Gauge
Vest
RETURN VALUE
: [Flashlight,Compass,Pressure Gauge,Vest]

0 COMMENTS

We’d like to hear from you!