pyflink.table.Table.group_by#
- Table.group_by(*fields: Expression) 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.