cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Number From Group By N

harshareddy
New Contributor II

Hi,
I am building a pipeline where i am using Group by N. I would like to know if there is a way to get the batch number of each document.
For example lets say i have 100 records in source and my group size is 10. Now this 100 records are divided into 10 batches. I would like to get the number if each batch. Is there a way to do this?
Thanks in advance

1 ACCEPTED SOLUTION

bojanvelevski
Valued Contributor

Hey @harshareddy,

You can achieve this by using a mapper after the group by, and adding the snap.in.totalCount function. Of course don’t forget to map the group, or check the Pass through option.

Bojan

View solution in original post

1 REPLY 1

bojanvelevski
Valued Contributor

Hey @harshareddy,

You can achieve this by using a mapper after the group by, and adding the snap.in.totalCount function. Of course don’t forget to map the group, or check the Pass through option.

Bojan