pyflink.table.Table.over_window#
- Table.over_window(*over_windows: pyflink.table.window.OverWindow) pyflink.table.table.OverWindowedTable [source]#
Defines over-windows on the records of a table.
An over-window defines for each record an interval of records over which aggregation functions can be computed.
Example:
>>> from pyflink.table.expressions import col, lit >>> tab.over_window(Over.partition_by(col('c')).order_by(col('rowtime')) \ ... .preceding(lit(10).seconds).alias("ow")) \ ... .select(col('c'), col('b').count.over(col('ow'), col('e').sum.over(col('ow'))))
Note
Computing over window aggregates on a streaming table is only a parallel operation if the window is partitioned. Otherwise, the whole stream will be processed by a single task, i.e., with parallelism 1.
Note
Over-windows for batch tables are currently not supported.
- Parameters
over_windows – over windows created from
Over
.- Returns
A over windowed table.