Question

Feature Merger merges wrong data when Requester/Supplier is a number

  • 27 February 2017
  • 3 replies
  • 0 views

Badge

Hi,

i’m calculating the sum of some areas and afterwards I add the calculated value to the original attributes. The values of the field GSTNR, on which the area calculation is grouped on, are 68226.3 and 68226.30 created in an AttributeManager of the Fields KG_NR and GST_NR, they are not numbers.

Somehow the Feature Merger merges the attribute values of 68226.3 to 68226.30.

Interestingly in the Data Inspector the value of 68226.3 is 68226.300000000003, in the output FGDB is the correct value.

But when I add any character to GSTNR in the AttributeManager(“text”+ KG_NR and GST_NR) e.g. text68226.3 the Feature Merger delivers the right result. So i tried with a StringFormatter to tell FME it’s a string, than again I get a wrong result.

The Data is stored in a FileGDB.

Is this a bug or am i doing something wrong? I added a zip with the workspace and some sample data.

Thanks for your help!

Workspace:


3 replies

Userlevel 4

Try setting the FeatureMerger comparison mode to "String" rather than Automatic.

Userlevel 2
Badge +17

Agree. Try setting String to the Comparison Mode.

It's a bit strange that the concatenation result from "68226" (string) and ".3" (string) will be treated as a numeric value (64 bit real) internally, though the result from "68226" and ".30" is treated as a string value, with FME 2016.1.3.

In FME 2017.0 build 17254, "68226" and ".3" became a string too. An improvement has been done here?

Badge

Try setting the FeatureMerger comparison mode to "String" rather than Automatic.

Thank you, this works

 

 

Reply