Afternoon All, i have a ESRI file gdb with 20 featureclasses within it. i want to change the value -99 to Blank within all the attributes and all the tables. LIke a global value mapper. Is there any simple solution im missing ?
Thanks Steve
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Also you could use a PythonCaller to iterate through all the attributes and replace the values. That way you would not need to specify which attributes that needs replacing.
It would be possible to make something with an AttributeExploder and a looping custom transformer, but a PythonCaller is probably the fastest and easiest solution, as SigTill also suggests. Here is an example:
import fmeobjects def global_string_replacer(feature): attributes = feature.getAllAttributeNames() for attrib in attributes: value = feature.getAttribute(attrib) if str(value).strip() == "-99": # Search feature.setAttribute(attrib, "") # Replace
It is easy to convert this into a custom transformer where the search and replace strings are given as parameters, if necessary.
To read all the features classes in a File Geodatabase, you could use the reader "Schema (Any Format)" and then pass the list of feature class names to a FeatureReader.