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

  • 18 November 2021
  • 1 reply
  • 1 view

Badge +13

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

icon

Best answer by redgeographics 18 November 2021, 11:05

View original

1 reply

Userlevel 4
Badge +25

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.

Reply