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


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?

icon

Best answer by ebygomm 18 May 2022, 11:30

View original

4 replies

Userlevel 1
Badge +21

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

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.

Userlevel 1
Badge +21

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

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!

Reply