Right. What confuses me is that data produced within a timer is not input data. It is synthesized within the timer and collected.
I just realized that my original question was a bit of nonsense. KeyedProcessFuntion has timers, and it is not a window a function. What I meant to say is that the operator prior and after are window functions with tumbling windows. [source] --> [window function with tumbling window 15 minutes] --> [keyed process function that uses timers] --> [window function with tumbling window 15 minutes] ... My keyed process function creates data every15 minutes if the system is idle. Let's say the windows tumble at this time... 00:15:00.000 00:30:00.000. 00:45:00.000. 01:00:00.000 and window 00:30:00.000. 00:45:00.000, that has these attributes: window start: 00:30:00.000. window end: 00:45:00.000 max timestamp: 00:44:59.999 that window will fire and purge when the watermark, if using a monotonous ascending timestamps, when the watermark is GREATER than 00:45:00.000, which means that the event time created by a timer that fires at 00:45:00.000 will NOT belong to window start: 00:30:00.000. window end: 00:45:00.000 when using the standard Tumbling Window assigner. Is my understanding correct? What if I want data generated in the timer that fires at 00:45:00.000 to belong to the window start: 00:30:00.000. window end: 00:45:00.000 , what must I do? It seems as though the event time will always be higher than the timestamp that triggers the timer firing. Must I create a special window assigner that accepts late data? On Tue, Sep 7, 2021 at 2:07 AM JING ZHANG <beyond1...@gmail.com> wrote: > Hi Marco, > I'm not sure which API or SQL query do you use. > If you use Windowed Stream API in DataStream [1]. The input data would be > assigned to a Window based on which Window Assigner do you use. If using > tumbling window, the input data would be assigned to a Window based on it's > event-time and registers an event timer trigger for the Window. You could > find more information in document [1]. When watermark passed the end of > Window, the window would be triggered. The event time of the output element > is inclusive upper bound of the trigged window. > If you use Window Aggregation based on Flink SQL [2]. The situation is > very similar. > > [1] > https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/datastream/operators/windows/ > [2] > https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/table/sql/queries/window-agg/ > > Best regards, > JING ZHANG > > Marco Villalobos <mvillalo...@kineteque.com> 于2021年9月7日周二 下午2:24写道: > >> If an event time timer is registered to fire exactly every 15 minutes, >> starting from exactly at the top of the hour (exactly 00:00, 00:15, 00:30, >> 00:45 for example), and within that timer it produces an element in the >> stream, what event time will that element have, and what window will it >> belong to if I am using a 15 minute tumbling event time window? >> >