Skip to main content
Solved

How can I assign a value to a new field that matches in one field but then differ in the second field?


kdwss
Contributor
Forum|alt.badge.img+3
  • Contributor

This seems easy but I'm not sure how to go about it. I want to do an initial match on ID1 and then detect if ID2 has different values. So A has different values in ID2, and B does not.

 

Initial data

imageRequired Data

image 

 

 

Best answer by dustin

Feed your features into an Aggregator, with Group By processing set to both ID1 and ID2. Send the resulting features to a Matcher with Group By set to ID1, which will give you the group of features where both ID1 and ID2 always match. This will be the Supplier in a FeatureMerger, with the original features being the Requestor, merging on ID1. From the Merged port assign the DIFFERS attribute as N, and from the UnmergedRequestor assign those DIFFERS as Y.

image

View original
Did this help you find an answer to your question?

3 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • Best Answer
  • October 5, 2023

Feed your features into an Aggregator, with Group By processing set to both ID1 and ID2. Send the resulting features to a Matcher with Group By set to ID1, which will give you the group of features where both ID1 and ID2 always match. This will be the Supplier in a FeatureMerger, with the original features being the Requestor, merging on ID1. From the Merged port assign the DIFFERS attribute as N, and from the UnmergedRequestor assign those DIFFERS as Y.

image


kdwss
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • October 5, 2023
dustin wrote:

Feed your features into an Aggregator, with Group By processing set to both ID1 and ID2. Send the resulting features to a Matcher with Group By set to ID1, which will give you the group of features where both ID1 and ID2 always match. This will be the Supplier in a FeatureMerger, with the original features being the Requestor, merging on ID1. From the Merged port assign the DIFFERS attribute as N, and from the UnmergedRequestor assign those DIFFERS as Y.

image

Works brilliantly, thank you!


It is very easy to assign the same value to another new value even if it is different. Just select the column assign the same value to both and implement it.

 

Expert Mold Inspection Services in Tampa FL


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