Skip to main content
I have an address table where each address point is classified into 1 of about 500 classification codes. I need to reclassify / condense this into just 10 codes:

 

1 = Code R% = Residential

 

2 = Code C% = Commercial

 

3 = Code CE% = Educational

 

4 = Code CX% = Emergency Services

 

...etc.,

 

where % is a wildcard character

 

 

I have tried a couple of transformers, but most don't support wildcards, so the 'best' option so far I have come up with is 10 pairs of Tester+AttributeCreator transformers in sequence.

 

My feeling is that there may be an easier way. Is there?

 

 

(Note: I am aware of the overlap in codes. The second line classes all lines starting with C as Commercial, but then the third line reclassifies those starting with CE as Educational)
Hi,

 

Yes there is, one AttributeCreator in which you make use of the conditional values definition.

 

http://blog.safe.com/2013/03/fmeevangelist113/
Hi Itay

 

 

Dankjewel. That was exactly what I was looking for! See below for some screenshots. And also thanks to Mark Ireland for the very well and clear written blog post.

 

 

My AttributeCreator Condition Definition:

 

 

 

My workspace, showing Before in pink and After in green:

 


Graag gedaan, Its a great addition that I use very frequently wouldnt know what to do wothout it nowdays.

Reply