count(*)
result downstream whenever each barrier passes (default interval is 1 second). This updated count is then reflected in the materialized view or outputted to external systems.event_time
surpasses the end time of a time window, the aggregation operator emits the final immutable aggregation result downstream. This result represents the complete aggregation for the window and is not subject to further changes.EMIT ON WINDOW CLOSE
clause. Additionally, a watermark must be defined on the data source, as it determines when the window can be closed. For a more detailed explanation of watermarks, please refer to Watermarks.
We can modify the query above to use emit-on-window-close semantics:
window_count
results will no longer include any partial aggregation results from the most recent window. Instead, a final result will only be delivered when the event_time
watermark surpasses the end time of the window.
window_start
and window_end
at the same time in emit-on-window-close queries.