Search

1. Preface
2. Introduction to Informatica Big Data Management
3. Mappings in the Hadoop Environment
4. Mapping Sources in the Hadoop Environment
5. Mapping Targets in the Hadoop Environment
6. Mapping Transformations in the Hadoop Environment
7. Processing Hierarchical Data on the Spark Engine
8. Configuring Transformations to Process Hierarchical Data
9. Processing Unstructured and Semi-structured Data with an Intelligent Structure Model
10. Stateful Computing on the Spark Engine
11. Monitoring Mappings in the Hadoop Environment
12. Mappings in the Native Environment
13. Profiles
14. Native Environment Optimization
15. Cluster Workflows
16. Connections
17. Data Type Reference
18. Function Reference
19. Parameter Reference # Precision Loss Due to Intermediate Calculations

When mappings run in high-precision mode on the Hive engine, additional precision loss can occur in expressions if precision loss occurs during intermediate calculations. The precision loss that occurs during intermediate calculations can affect the return value of the expression.
Precision loss might occur during intermediate calculations if intermediate results are rounded.
For example, you might have the following expression:
`206.85 * 891.94 * 0.01`
The values 206.85 and 891.94 are decimal data types dec(38,2). The value 0.01 is decimal data type dec(2,2).
The expression can be computed with or without intermediate calculations.

## Computing without Intermediate Calculations

If you compute the expression without intermediate calculations, the entire expression is computed at once:
`206.85 * 891.94 * 0.01 = 1844.97789 = 1844.98`
The result is a decimal data type dec(38,2) , so the result 1844.97789 is rounded using a scale of 2. The final result is 1844.98.

## Computing with Intermediate Calculations

If you compute the expression with intermediate calculations, the result of the expression might differ.
An expression might require intermediate calculations if the expression contains a user-defined function. For example, a user-defined function might require that the expression is calculated using the following steps:
```Step 1. 206.85 * 0.01 = 2.0685 = 2.07
Step 2. 2.07 * 891.94 = 1846.3158 = 1846.32```
In Step 1, the Hive engine processes the intermediate calculation. Since the intermediate result is a decimal data type dec(38,2), the intermediate result 2.0685 is rounded using a scale of 2. The resulting value 2.07 is used in the following calculation in Step 2. The result in Step 2 is another decimal data type dec(38,2), so the result in Step 2 is also rounded using a scale of 2. The final result is 1846.32.
Note that the value 1846.32 computed with intermediate calculations differs from the value 1844.98 that is computed without intermediate calculations. The precision loss that occurs during the intermediate calculations skews the return value. Updated October 23, 2019

Resources