Skip to main content
Solved

I have a table with two Columns A and B like that: A B 1 1 1 2 1 3 2 1 3 1 7 4 4 7 And my result should look like that: A B 1 1 1 2 1 3 4 7

  • May 18, 2022
  • 4 replies
  • 14 views

michellem
Participant
Forum|alt.badge.img

So I want to delete the duplicates, or find the distinct combinations across two columns.

I know I can do that with SQL on a database. But I just have a table here and want to do that directly in my FME script.

Does someone has an idea?

Best answer by ebygomm

You can use an AttributeCreator/AttributeManager with a conditional statement to create a new value that is always the lower value followed by the higher value. Then a duplicatefilter to get only the unique records

image

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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • May 18, 2022

Do you have a table with two attributes? Or a single attribute with two values separated by a hyphen?


michellem
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 2 replies
  • May 18, 2022

Do you have a table with two attributes? Or a single attribute with two values separated by a hyphen?

Oh sorry, I have a table with 2 columns. I just seperated the columns here with a hyphen.

I think this is missleading. I change it.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • Best Answer
  • May 18, 2022

You can use an AttributeCreator/AttributeManager with a conditional statement to create a new value that is always the lower value followed by the higher value. Then a duplicatefilter to get only the unique records

image


michellem
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 2 replies
  • May 18, 2022

You can use an AttributeCreator/AttributeManager with a conditional statement to create a new value that is always the lower value followed by the higher value. Then a duplicatefilter to get only the unique records

image

Thanks, that's it!