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 ?
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.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.