Forum Discussion
I also have a similar use case and want to confirm the functionality of the Union snap. I have a single input file which contains a mixed set of records for dogs and cats. Within my pipeline I use a Router snap to send dog records down one path and cat records down another. Both of these paths are then merged through the use of the Union snap.
I don’t need to preserve the order of the input data, but I do need to preserve the order for each of the paths, cats and dogs.
If the input data contains cat1, cat2, cat3, dog1, dog2, dog3 I am OK if the Union output is cat1, dog1, cat2, dog2, cat3, dog3 as the Union output continues to preserve the order of the records in their respective sets.
Is it guaranteed that the Union output will preserve the order of the records through each of the paths/streams or is it possible that cat1, dog2, cat3, dog1, cat2, dog3 could be the output of Union?