Variable time gap in Session Window

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Variable time gap in Session Window

Teena Kappen // BPRISE

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

Reply | Threaded
Open this post in threaded view
|

Re: Variable time gap in Session Window

Fabian Hueske-2
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,

2018-02-17 8:01 GMT+01:00 Teena Kappen // BPRISE <[hidden email]>:

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