I have 3 attributes that could potentially have duplicates. A, B, C. After finding the duplicates, I have to make a decision on which ones to keep based on attribute D. The scenario is as followed: if A,B,C are the same, take the record where D is not null. If D is null for both records, take any one. If D both have values, take both unless the value in D is the same then take just one. Help!
Solved
finding duplicates then selecting one based on a value in another attribute
Best answer by erik_jan
If the features do not have a geometry, this could work:
Use an Aggregator, group by A, B, C, creating a list for all other attributes.
Use the ListSorter on D (to move the object with a D value to the top of the list).
Then use the ListIndexer (index 0) and ListRemover to keep the first object in the list.
If you do have geometries I would first use the GeometryExtractor to safe the geometry in an attribute and reverse that at the end using the GeometryReplacer.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.