pyflink.table.Table.group_by#
- Table.group_by(*fields: pyflink.table.expression.Expression) pyflink.table.table.GroupedTable [source]#
Groups the elements on some grouping keys. Use this before a selection with aggregations to perform the aggregation on a per-group basis. Similar to a SQL GROUP BY statement.
Example:
>>> tab.group_by(col('key')).select(col('key'), col('value').avg)
- Parameters
fields – Group keys.
- Returns
The grouped table.