cancel
Showing results for 
Search instead for 
Did you mean: 

Does "Group By" Snap looks into what's in other fields when asked to group on the basis of just one field?

vaidyarm
Contributor

I have encountered an issue, where group by snap is not grouping data simply on the basis of the field specified. it actually looks into each document before place it under the group section of the output, which is strange as it should not look into other fields while grouping documents together except the field defined in the group by snap.

This case was causing my payload even with the same ID in the group by fields, it was segregated into different groups. which I don’t want

Any Thoughts?

3 REPLIES 3

bojanvelevski
Valued Contributor

Hi @vaidyarm ,

Sorting the data on the same field, before using Group By will fix your problem

Does Group BY Snap have any limit that how many documents it can keep under group? after we sorted the input data?

The Sort snap doesn’t dictate how many records will the Group snap keep in one group. As the name suggests the Sort snap, sorts the incoming documents.

Group by requires clean, ordered data to do it’s magic.