I have to do some math on very large integer values, which are stored on a database as BIGINT(12). When I load these values, Knime uses “long” as data type.
When I run a math node all these long type values are changed into double values. Normally this isn’t an issue, but I want save them back on my DB as long type too.
Value from DB: 312345123450 (Long)
Math: devide by 10: 31234512345 (Double)
When I enable “integer” in the math node I receive an error, because the number is too big for an integer…
So, after the math node my column is stored as a double.
How can I convert it back to a long data type?
- Column auto type cast => does not work
- number to string (3.1234512345e10) + string manipulation (remove “.” and “e10”) + string manipulation (toLong(input)) = is painful