07-13-2020 02:18 PM
Hi,
After using group by logic for combination of fields the downstream snaps are loosing the values.
Example:
Input file fields: field1, field2 field3, field4,Test1,test2
group by Logic Used for: field1, field2 field3
after above step : values are not finding for field4,Test1,test2.
how to get original values.
Thanks,
07-14-2020 07:20 AM
If you preview the documents after the Group By snap, there should be a “group” field which is an array containing the fields not used in the Group By property.
07-14-2020 07:41 AM
Hi Kory,
Thanks for response.
Iam using Aggregate/group by columns, where it is not available, is there a way for this?
Thanks,
07-14-2020 07:49 AM
Perhaps we need more information here so we understand what you are expecting from the output. An Aggregate snap works much like a database Group By… fields not listed in the “Group-By-Fields” property can have an aggregate function applied (sum, count, min, max, etc.) in the “Aggregate fields” table and would no longer be present in the output (except in aggregated form as specified).
Please review the Aggregate snap documentation to ensure this is the action you are looking for.
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438462/Aggregate
It almost sounds like you may really need either the “Group By N” or “Group By Fields” snap.
On the other hand, if you are trying to get aggregate values and keep the detail documents, you may need to use a Copy before the Aggregate, and Join the documents back after the Aggregate.