groupBy

groupBy groups column content into arrays.

Syntax

Parameters

ParameterTypeDescription
groupByColumnsString...

The column(s) by which to group data.

  • NULL the content of each column is grouped into its own array.
  • "X" will output an array of values for each group in column X.
  • "X", "Y" will output an array of values for each group designated from the X and Y columns.
groupByColumnsCollection<? extends ColumnName>

The column(s) by which to group data.

  • NULL the content of each column is grouped into its own array.
  • "X" will output an array of values for each group in column X.
  • "X", "Y" will output an array of values for each group designated from the X and Y columns.

Returns

A new table containing grouping columns and grouped data. Column content is grouped into arrays.

Examples

In this example, groupBy creates an array of values for each column.

In this example, groupBy creates an array of values, as grouped by X.

In this example, groupBy creates an array of values, as grouped by X and Y.