Modeling Guide for SAP Data Hub

Additional Type Specific Constraints

JavaScript has no integer type, but only a number type, which is internally represented as a IEEE-754 double precision float. Thus, only integer values up to 53 bits can be exactly represented.

To prevent from silent and undetected problems, the Node.js subengine will intentionally stop with a corresponding error message when receiving or sending an unsafe integer value. If an Node.js operator faces such a problem, the corresponding pipeline will also stop.

Unsafe integer value is defined as follows:

The safe integers consist of all integers from -(253 - 1) to 253 - 1 (inclusive). That means, that the full range of SAP Data Hub Modeler types uint64 and int64 cannot be represented in JavaScript/Node.js

type uint64 - range: 0 … 2**64 -1 (0 through 18446744073709551615)
type int64: -(2**63 -1) … 2**63 –1 (-9223372036854775808 through 9223372036854775807)
If converted into number, the mathematical rules of equality can be violated in JavaScript. See the following examples:
( 1 === 2 ) === false // <- this always evaluates to false and is mathematically exact
    
// Now, add MAX_SAFE_INTEGER to both sides:
( 1 + Number.MAX_SAFE_INTEGER === 2 + Number.MAX_SAFE_INTEGER ) === true // <- results to true       
// Also a legal expression, it is mathematically incorrect 

For more detailed information about safe integer, see the external link developer.mozilla.org, datatype (IEEE-754)Information published on non-SAP site.