Forum Discussion
kmiesse
6 years agoContributor
I’m assuming the documents have the same structure but not the same values. I just want to see the differences in the values between two consecutive documents in a single stream.
tlikarish
6 years agoEmployee
Here’s what I was thinking.
The GroupByN snap will group each 2 consecutive documents into a single document. Note this will group the first and second, third and fourth, and so on, but not the first and second, second and third, third and fourth. If you wanted to do a more complex grouping like the latter, you’d probably have to muck around with adding an index and joining.
From there, the example is pretty simple and shows how to use the Mapper to do some basic operations on the data.
Hopefully this is helpful.