Skip to main content

Greetings,

 

I am trying to replace values using the AttributeValueMapper, it is not replacing the attributes in the field

 

image 

I would appreciate any assistance to resolve this issue.

 

Can you, as an interim measure, try writing out to a new attribute?

 

Did you import the input values or type them manually? If you did them manually, is there a chance of any trailing spaces or other special characters?


Can you, as an interim measure, try writing out to a new attribute?

 

Did you import the input values or type them manually? If you did them manually, is there a chance of any trailing spaces or other special characters?

Agreed, it's probably a mismatch between the actual data and the configured input values. Note that the transformer is case sensitive.

You can also try inserting an AttributeTrimmer before the AttributeValueMapper to see if that helps. Perhaps also a StringCaseChanger to force upper case.


Hi

Thanks for the reply.

 

I have a trimmer before the AttributeValueMapper.

I copied and pasted the Value as:

RASSAU

@value(RASSAU)

 

Neither has any impact on the output??

image


I updated the Form.

 

imageNo values have been updated??

 


Apparently I clicked wrong and some posts were deleted, my bad

 

imageGo back to this situation, remove the first line (SITENAME and SITENAME) because it's referring to attributes rather than attribute values. Change the output attribute name to NEW_SITENAME, then run it.

 

If you don't see the values you expect in NEW_SITENAME it's because your input values don't appear in your SITENAME attribute, simple as that.

 

The AttributeValueMapper works as a lookup table: it looks in the input attribute for a value that appears in the input value column and if it finds one it puts the corresponding output value in the output attribute. If it doesn't find a match it'll put the default output value (or nothing if that's empty). Check this video where @mark2atsafe​ talks about the AttributeValueMapper to see how it's used.

 

Keep in mind it is, like pretty much everything in FME, case sensitive. So RASSU and Rassu are not the same.

 

Also keep in mind that any time you see a brown arrow it refers to an attribute rather than an attribute value, so that's why in that previous screenshot it simply mapped everything to the original value: that was on the first line so that's what it did (and that's why I want you to remove that first line).

 

Now, if you still don't see any matches: inspect your source data and make sure those values are in there.


Is there an alternative transformer, this is not getting anywhere??

 

I created a new attribute NEW_SITENAME

imageimageimage


Is there an alternative transformer, this is not getting anywhere??

 

I created a new attribute NEW_SITENAME

imageimageimage

Last try, then I give up. Here's one I set up for one of my projects:

 

imageThis looks in the attribute FAC_TYPE for the values 4013 or 4100. If it finds them it will fill a new attribute, called TYPE, with the values NMBS Station and Metrostation respectively.


I also tried BulkAttributeRenamer.

image 

Still no success??

image


I finally managed to get the issue resolved using an AttributeFilter.

 

image


Reply