Skip to main content
Solved

i would like to have the same value of specific column for the same id but it depends on larger lengths for id_counter coulmn

  • November 18, 2021
  • 1 reply
  • 13 views

gogopotter90
Contributor
Forum|alt.badge.img+14

I am not able to get the result that i want :

i would like to have the same value of difference column for the same id but it depends on larger lengths for id_counter column .

when we compare the row no.3 and row now.4 for id = 6

so the output should be for first row

id_counter = 1 /lengths = 2 /ID = 6/ difference = good

and the other row for the same id will be still the same

and the same idea with all rows .

if the value in difference column is the same for the same_id so the program should do nothing and keep it .

i was thinking to do it with matcher but i could not get the correct result .

questionthanks for help fme 2018

Best answer by redgeographics

If you use a Sorter to sort on the column ID first and then lengths (numeric, descending) you can then use a Sampler, grouped by ID, to take the 1st feature. Use that as a Supplier in a FeatureMerger and the not-sampled features as Requestors, making sure to set that to use the supplier values in case of attribute conflicts.

 

Screenshot 2021-11-18 at 11.04.42Something like this. Since you're on FME 2018 some parameters may be different, if you have the opportunity to upgrade that would be highly recommended.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3698 replies
  • Best Answer
  • November 18, 2021

If you use a Sorter to sort on the column ID first and then lengths (numeric, descending) you can then use a Sampler, grouped by ID, to take the 1st feature. Use that as a Supplier in a FeatureMerger and the not-sampled features as Requestors, making sure to set that to use the supplier values in case of attribute conflicts.

 

Screenshot 2021-11-18 at 11.04.42Something like this. Since you're on FME 2018 some parameters may be different, if you have the opportunity to upgrade that would be highly recommended.