Hi,
Are you using SQL or DataStream? For SQL you can use the Window TVF
<https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/queries/window-tvf/>
feature, where the window size is the "max" elapsed time, and then inside
the window you pick the beginning and end event and join them.

Hope it helps,
FG

On Thu, Jan 6, 2022 at 3:25 PM HG <hanspeter.sl...@gmail.com> wrote:

> Hello all,
>
> My question is basically whether it is possible to group events by a key
> (these will belong to a specific transaction) and then calculate the
> elapsed times between them based on a timestamp that is present in the
> event.
> So a transaction my have x events all timestamped and with the
> transaction_id as key.
> Is it possible to
> 1. group them by the key
> 2. order by the timestamp,
> 3. calculate the elapsed times between the steps/event
> 4. add that elapsed time to the step/event
> 5. output the modified events to the sink
>
>
>
> Regards Hans
>

Reply via email to