Struggling with a really simple problem; I need to convert attribute from string to numeric in FME. have tried using the arithmetic editor, but every time I export to GIS I get string. It seems when one uses the statistics calculator you get numeric. Any ideas? As I am all out of them. Ashton
FME change data format from string to numeric
695 views Asked by Ashton Eaves At
1
One could start using an AttributeCreator to create:
The AttributeCreator will get whatever is in the attribute _orig_value, removes everything that is a not digit, dot or sign and tries to convert the value into a float value in the new attribute _result.
When writing stringvalues to a float database field, FME will convert the string automatically to float.
Note: Be careful to use regex to recognize numbers like this, it could end up combining all digits from multiple number values in one string, into one large number value, or result in 'numbers' having multiple decimal separators. To tailor the way numbers are recognized, adjust the regex [^\d.-+] above.