The short story. After 3.2 and the introduction of BigInteger our data are getting unreliable. In the past we received data in double, now they are in BigInteger, which only work in 3.2, not even FME, seems to read those fields yet.
Some tools fails to use BigInteger, for example, you can't use them for Relate. The fields I'm using has around 10 characters, and are used as ID's for joining tables, so it's a pain
I want to calculate the data from BigInteger to Double. I can use iterate fields, which will find all my BigInteger fields and add them into the output value.
I can add a new Double field using the %Value%_
I can't figure out how to do the calculation where it fails in the expression.
The Field Name == %Value%_ works
So far I've been able to add the name of the BigInteger fields into the new fields, of course that's not what I want.
I've been trying something like:
Expression: calculateValue(!Value!)
CodeBlock:
def calculateValue(Value):
if Value is None:
return None
else:
return float(Value)
and a whole lot of other things, but I'm a bit stuck here.
Thanks.
I wouldn't be using float values for relates. That will be very unreliable with rounding errors. The only solution if you have very large integers is to convert them to text strings. This has happened to me in the past with very large prefixes added in Oracle to merge databases creating 13 digit integers with lots of zeros. If you use text then it will still preserve the IDs even in Shape (😂) files.
And now BigIntegers are appearing that do not work in most applications, relates or whatever. If Long Integer is not enough, then Text is the best option there too.
Census tracts are very long numbers and sometimes they have leading zeros that are significant. Text fields will preserve these.