Skip to main content
Question

FME Form not reading numbers as numbers


scarter
Contributor
Forum|alt.badge.img+10

Hello Forum,

 

I have a workspace which is reading in a csv containing a field called UPRN. Some of the values are full (e.g.: 200003362891) but some values are zero. This is expected in the data and is fine.

 

 

 

But when read into the FeatureReader the values look like this (when set as Number)…

 

And if set as Int64 it comes out like this…

How do I force FME to bring in those UPRN values as contained in the source data?

 

Thanks,

 

13 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • June 16, 2025

If you view the source csv in a text editor do the UPRNs have an apostrophe in front of them? In your excel screenshot they look like they’ve been set to numbers stored as text

 

I’m sure I’ve seen similar behaviour when someone has opened and resaved a csv file within excel


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 16, 2025

Thanks for that, ebygomm.

 

The UPRN values, whether they be a full completed number or a 0, are sound when viewed in Wordpad.

 


hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Celebrity
  • June 16, 2025

Do you get the same behavior when using a standard reader? What version of FME are you using?

 

I’m wondering if there may be an encoding issue, can you share (a subset of) the file?


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2025

@hkingsbury I’m on FME Form v2024.2.5.0. I prefer the FeatureReader because of the flexibility it offers. However I will try a standard reader in this case.

 

I’ve attached a stripped down version of the data.

 

Note in advance that I wouldn't be in a position to dictate that the data owner makes changes to the source data. Well, not much anyway. It would be preferable to accept what they provide and then get FME to do the work.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • June 17, 2025

Do you see the same behaviour with your sample file? 

It looks exactly as expected for me with a FeatureReader in 2024.1

 

But I have seen issues before where a large csv file behaves differently to a stripped down version. I think in that case changing the maximum rows to scan to something smaller fixed the issue but my memory is hazy.


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2025

@ebygomm I tested with the sample. I agree, it does work fine. Now, I just need to get it working correctly with the full dataset.


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2025

@hkingsbury I experience the same problem when using a standard reader.


nielsgerrits
VIP
Forum|alt.badge.img+54

What version FME do you use ​@scarter?


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2025

@nielsgerrits I’m using FME Form v2024.2.5.0


nielsgerrits
VIP
Forum|alt.badge.img+54

Ah silly me I now see you already added the version, sorry.

I tried to reproduce this is in 2024.2.1. If type is set to number, it returns numbers as expected. int16 returns null. It defaults to uint64, this returns numbers as expected..

Encoding is default set to Windows Latin-1 (windows-1252).


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2025

@nielsgerrits l I have tried ‘Number’ before. But I’ll give it another try.


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2025

@nielsgerrits If I change the UPRN attribute Type to ‘Number’ They come out like this in the reader…

 

And they come out like this in any output…

 

 


evieatsafe
Safer
  • Safer
  • June 23, 2025

Hi ​@scarter I believe the scientific exponential notation for the number that you see in the visual preview is only for display, if you were to perform any calculations on this it would output as expected. Assuming you are not wanting to calculate anything from this number perhaps you could try setting the data type to string / varchar?
 

You can set the data type to be different on the writer / output to match your dataset. What are you integrating with to get the -9999 in the output and what data type is set for that value in the writer?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings