Skip to main content
Question

How to process items grouped by a field, for multiple transformers.

  • April 8, 2024
  • 1 reply
  • 52 views

ecx
Supporter
Forum|alt.badge.img+4
  • Supporter

I have 100 items of data, which are grouped together in various sub groups using a field 'groupNo',

I want to process each set of groupNos individually, I need to select a group, and do the following processes for each individual group: Take one item with status 'original' which has data and duplicate that data to the 'new' items in that group. How would I do this using the groupNo identifier? 

An example input output data set:
 

Input:
OID, Status, Data, Group
1, Original, XYZ, 1

2, New, <null>, 1

3, Original, ABC, 2

4, New, <null>, 2

5, New, <null>, 2

 

Output:

OID, Status, Data, Group
1, Original, XYZ, 1

2, New, XYZ, 1

3, Original, ABC, 2

4, New, ABC, 2

5, New, ABC, 2

 

 

1 reply

davidlee
Supporter
Forum|alt.badge.img+7
  • Supporter
  • April 8, 2024

There are many ways to process it. You can use FeatureMerge to merge attributes. Firstly, you have to filter Null value and has a value of "Data" field, then you can use set of Null data as Requestor with key "Group", and set of has a value data for Suplier with key "Group". You will have a result with features with attributes are merged, then use another transformers to get attributes you need such as AttributeRenamer, CreatorAttribute, AttributeValueMapper.....


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings