You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Teena Kappen // BPRISE <te...@bprise.com> on 2018/02/17 07:01:45 UTC

Variable time gap in Session Window

Hi,

Is it possible to have a variable value inside the time field for session window?

input
    .keyBy(<key selector>)
    .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
    .<windowed transformation>(<window function>);
In the above code, instead of the value 10, which will be the same for all records, is it possible to have a value which can be picked from the record that comes in?

Regards,
Teena

Re: Variable time gap in Session Window

Posted by Fabian Hueske <fh...@gmail.com>.
Hi Teena,

I think we just added exactly the feature you are asking for [1].
Dynamic session windows will be release with Flink 1.5.0.

It would be great if you could try the feature and check if it fits your
requirements and works as you'd expect it to work.

Thanks,
Fabian

[1] https://issues.apache.org/jira/browse/FLINK-8384

2018-02-17 8:01 GMT+01:00 Teena Kappen // BPRISE <te...@bprise.com>:

> Hi,
>
>
>
> Is it possible to have a variable value inside the time field for session
> window?
>
>
>
> input
>
>     *.*keyBy*(<*key selector*>)*
>
>     *.*window*(*ProcessingTimeSessionWindows*.*withGap*(*Time*.*minutes*(*
> 10*)))*
>
>     *.<*windowed transformation*>(<*window function*>);*
>
> In the above code, instead of the value 10, which will be the same for all
> records, is it possible to have a value which can be picked from the record
> that comes in?
>
>
>
> Regards,
>
> Teena
>