Community Conundrums are live! Learn more

Schema changes from double to integer all the time.

Level 2
Schema changes from double to integer all the time.
I have a column with round floats (e.g. only 1.0, 100.0, etc.) and manually defined it as type "double" in a visual recipe. However, once the dataset is loaded into another visual recipe, the visual recipe automatically changes all the column types back to "integer" causing a failure everytime there appear a non-round float (e.g. 1.5).

How can one avoid that (visual) recipes automatically cast numbers to the format they think is appropriate, even though they don't know what data might run through them later on?
3 Replies
Dataiker
Dataiker
Hi,

This behavior cannot be disabled. However, if you have "1.0" it will detect as double, not integer - so I guess you actually have "1". In that case, you can go in the dataset settigns and make sure the "normalize doubles" parameter is set in the format params. This will ensure that "1" will appear as a proper "1.0" double and won't be integerified.
0 Kudos
Level 2
I would also like to know the answer to this.
0 Kudos
Level 2
Author
Thanks! How can one avoid that if you e.g. copy a string column that only contains numbers, that the copied column is also of type string and not casted to integer or float?
0 Kudos