Skip to main content
Question

AttributeRenamer leaving missing fields in


don_weaver
Contributor
Forum|alt.badge.img+2

When ‘Remove Output Attribute’ is selected for ‘If Input Attribute is Missing’  The missing attributes (the attributes with no data) are still present in the output.  Any clues?

 

8 replies

crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • July 3, 2025

Hi ​@don_weaver 

This may seem trivial but are the values "missing” or null or space or 0?

I think they will be treated differently.


virtualcitymatt
Celebrity
Forum|alt.badge.img+39

Ahh - the option is there to decide how to treat data which already has an attribute with the output name. 

For example if I’m reading 2 shapefiles, one with an attribute called “Roads” and the other with “ROADS”. I want them all to be “Roads” so I put in an AttributeRenamer to rename “ROADS” to “Roads”. The option to “Remove Output Attribute” “If Input Attribute is Missing” is referring to the case where the input shapefile with the “Roads” has no “ROADS” attribute in  input. 

Essentially this setting will either preserve existing values for “Roads” OR can map “Roads” to missing.

Anywhere you see a <missing> value in the data inspector table this just because you can have features with a mixture of different schemas but FME needs to have a way of showing it all in a single table. If you look in the FeatueInformation window there data aren’t actually there. 

 



You can read more about it here: https://support.safe.com/hc/en-us/articles/25407786594829-How-Does-FME-Handle-Null-Attribute-Values


don_weaver
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • July 3, 2025

Thanks for the replies!

What am trying to do is :

we have a german datamodel in our GIS , so I want to swap the german field name for the english one.

We have many object classes (approx 18) , some which have common field names, and there are unique field names for most classes too.

Instead of configuring a custom AttributeRenamer for each class, I wrote a csv file with all the german/english translations in it, and imported this into an AttributeRenamer that could be used for all object classes, but the problem is : all the fields that don’t apply are sent through as ‘missing’

I’ve also tried loading the csv file into  the AttributeManager and SchemerMapper with no success.

Has anyone acheived what I’m attempting to do, or is there a better method?

 


crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • July 3, 2025

@don_weaver I would have thought that the schemamapper would have been your best transformer here. But I think you need a check on whether the original field name is present as you have a complete list of German to English translations and not all are present in every data table? Is that correct?

Also, I wonder if an alias name would be appropriate in this case? Then you would have both. I don't know if that would cause problems though.


don_weaver
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • July 4, 2025

@crutledge Correct - not all fields/translations apply to every data table , which is where the issue is.  


takashi
Evangelist
  • July 4, 2025

don_weaver
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • July 8, 2025

@takashi thanks for the hint.  I set this up, but …..

 

Does anyone know how to make the SchemaMapper expose the renamed (mapped) attributes?


crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • July 8, 2025

SchemaScanner then AttributeExposer? I don’t know if the AttributeExposer can function dynamically using the scanned schema. You can always send the schema to a featurewriter and then read it in. 


Reply


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