Skip to main content
Dear FME community,

 

 

I have an attribute which contains several unique string combinations. For example:

 

attribute: number

 

values: "one", "two", "three", "four", "five"

 

 

I want to add a unique number (id) as a new attribute. Each attribute with the value "one" should become 1, each value "two" should become 2 and so on. If there are more than a single "one", then each one should have the new value 1.

 

 

I tried to solve this with the counter transformer with "Counter Name" set to the attribute "number", so that this attribute is the attribute to group by. But this one didn't work. It only works with the CRCCalculator, but then I don't get the simple id's that I want.

 

 

Any idea's on how to solve this issue? I simply want create a new column wich contains a number as a new identifier for the string attribute value.

 

 

Kind regards from Germany

 

Thomas

 

 
Hi Thomas, the AttributeValueMapper or the StringPairReplacer might help you.

 

Takashi
yes or use  string map "one" 1 "two" 2 etc. ] in a attributecreator

Reply