Group by fields with specific group size
Hello All, Is there a way we can use group by fields limited to a group size? Group by fields snap doesn’t let us specify a group size, so if we try to create groups based on a field, whether the occurrence of the field is 5 times or 500 times, output of group by fields snap would always be one group with all the object with that one common field together. What if we want to create different groups with similar field of similar size. For instance, if there is a field called ‘id’ with value ‘5’ and it occurs 20 times in an input, can we create 4 groups out of it with each group containing 5 values. If it were 22, it should create 5 groups. This is like using group by N and group by field snap together. Any suggestions or help on this would be really great. Thank you.Solved5.2KViews0likes4CommentsTransforming denormalized data to a single message
I have CSV similar to: Id,FName,Lname,street,city,state 15,Mary,Smith,123 Main,Anytown,NY 15,Mary,Smith,456 Elm,Sometown,PA 22,Joe,Know,123 4th,BigTown,NJ 22,Joe,Know,456 Shade,NoTown,VA There can be any number of the id’s which means that any person can have any number of addresses. What I want to do is transform this to group on the id’s so the addresses are an array of objects under the name. This seems very similar to Transformation for data or Map data to json structure - #3 by eguo but just different enough where I am not able to figure it out. Target JSON would be: [ { “attributes”: { “FirstName”: [ { “value”: “Mary” } ], “LastName”: [ { “value”: “Smith” } ], “Address”: [ { “value”: { “AddressLine1”: [ { “value”: “123 Main St” } ], “City”: [ { “value”: “Anytown” } ], “StateProvince”: [ { “value”: “NY” } ] } }, { “value”: { “AddressLine1”: [ { “value”: “456 Elm St” } ], “City”: [ { “value”: “Sometown” } ], “StateProvince”: [ { “value”: “PA” } ] } } ] } }, { “attributes”: { “FirstName”: [ { “value”: “Joe” } ], “LastName”: [ { “value”: “Know” } ], “Address”: [ { “value”: { “AddressLine1”: [ { “value”: “123 4th” } ], “City”: [ { “value”: “Bigtown” } ], “StateProvince”: [ { “value”: “NJ” } ] } }, { “value”: { “AddressLine1”: [ { “value”: “456 Shade” } ], “City”: [ { “value”: “NoTown” } ], “StateProvince”: [ { “value”: “VA” } ] } } ] } } ]Solved3.9KViews0likes4Comments