Hi,

I need to output some data streaming from multiple devices directly into a
map (mapboxjs).

Basically, every 1 second, I want to only write the last data point for
each device to a json file. My problem resides in "how to pick the latest
data point by device"

My incoming flow file has three attributes: device_id, lat, lon.
at some point they may queue up like this:

1, (-37,20)
1, (-37.1,20.1)
2, (-40,30)
2, (-40.1, 29.9)

At the end, I wish to only have the latest point for each device ID
1, (-37.1,20.1)
2, (-40.1, 29.9)

How can I design a processor for this?

Thanks!
Stephane

Reply via email to