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,
Page 1 / 1
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
Thanks for that, ebygomm.
The UPRN values, whether they be a full completed number or a 0, are sound when viewed in Wordpad.
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?
@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.
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.
@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.
@hkingsbury I experience the same problem when using a standard reader.
What version FME do you use @scarter?
@nielsgerrits I’m using FME Form v2024.2.5.0
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).
@nielsgerrits l I have tried ‘Number’ before. But I’ll give it another try.
@nielsgerrits If I change the UPRN attribute Type to ‘Number’ They come out like this in the reader…