Re: Keeping latest data point in a data stream variable
Posted by
rmetzger0 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Keeping-latest-data-point-in-a-data-stream-variable-tp7642p7646.html
Hi Biplob,
would you like to send the last value somewhere?
is there a way of detecting when the stream ends? (Something like a marker element, or could you use a timeout?)
Anyways, what you can do is use a flatMap() function, always store the current element. Once the stream is over, you emit the last element.