Skip to main content
Question

distinct values


Forum|alt.badge.img
Guys,

 

 

I'm lokking for a way to select all distinct values of all the attributes in a table.

 

 

For exemple :

 

 

City / Color  

 

-------------------

 

New-York / red

 

New-York / blue

 

Berlin / yellow

 

Chisinau / red

 

Chisiau / blue

 

 

and the answer would be "New-York Belin Chisinau"  and "red blue yellow"... That could be writen in an excel file or txt...

 

 

It's more or less the same action than an advanced filter in excel... 

 

 

Does anyone know how to do that ?

 

 

thank's in advance

 

 

 

2 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • August 5, 2013
Hi,

 

 

A simple sampler with your attributes in the group by setting will provide your desired result.

takashi
Influencer
  • August 5, 2013
Hi,

 

 

The Sampler is a good choice as Itay mentioned.

 

Alternatively, the DuplicateRemover also can be used. To get distinct city names for example, specify "City" to the "Key Attributes" parameter and collect output features from UNIQUE port.

 

 

If you need to get finally a concatenated string like "New-York Berlin Chisinau", consider creating a list and concatenating elements of the list after sampling. The ListBuilder or the AttributeAccumulator creates a list, and the ListConcatenator concatenates the elements. Or, the Aggregator does both of creating list and concatenating the elements.

 

 

Takashi

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings