Flink sql problem

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

Flink sql problem

ゞ野蠻遊戲χ
Hi all

          After grouping by users, message A arrives. If message B also arrives later, and the time of message B is less than that of message A within 10 minutes, mark the field in message A with Tag = True. How to achieve this?

Thanks
Jiazhi
Reply | Threaded
Open this post in threaded view
|

Re: Flink sql problem

Timo Walther
Hi Jiazhi,

I think an OVER window might solve your use case. It gives you a rolling
aggregation over period of time. Maybe you need to define a custom
aggregate function to emit the final record as you need it.

Let me know if you have further questions.

Regards,
Timo


On 27.01.21 15:02, ゞ野蠻遊戲χ wrote:
> Hi all
>
>            After grouping by users, message A arrives. If message B also
> arrives later, and the time of message B is less than that of message A
> within 10 minutes, mark the field in message A with Tag = True. How to
> achieve this?
>
> Thanks
> Jiazhi