Problem when importing big numbers

Hi,

I have a file (csv format) with a column "fullVisitorId", that is a number with 19 digits. When I read this number as double with File Reader node, I lost precision. See example below:

Original file (csv):

fullVisitorId,totaldays,totalpageviews,user
116442844092576134,31,7145,Anonimo
116442844092576130,311,71451,Anonimo
11644284409257613,312,71452,Anonimo

After File Reader node (with double):

1.16442844092576128E17  31  7145  Anonimo
1.16442844092576128E17  311 71451 Anonimo
1.1644284409257612E16   312 71452 Anonimo

Originally lines 1 and 2 have different values for fullVisitorId. After read in Knime, both values are equals.With Interactive Table node, I saw "116,442,844,092,576,128" in lines 1 and 2.

If I change this column type to String, the values are correct:

116442844092576134  31  7145  Anonimo
116442844092576130  311 71451 Anonimo
11644284409257613   312 71452 Anonimo

What is the problem?

Thanks!

Mauricio Onoda

 

 

 

Hi Mauricio,

19 digits is too long for double-precision numbers. At most, you can have 15-17 significant decimal digits, see here: https://en.wikipedia.org/wiki/Double-precision_floating-point_format

Apart from that, you can use the columns as strings, which I think should not be an issue since they are IDs.

Cheers,

Roland