When compiling a Talend 6.4.1 Spark Hive Job with schema BigDecimal type columns, because the generated Job Java code contains local variables (here, the local variable is scale_3) that have been declared several times, it fails with the following message:
Duplicate local variable scale_3
In this case, the batch Spark Job contains a tUniqRow component with two links to a tHiveOutput component:
tUniqRow > (uniques) > tHiveOutput
tUniqRow > (duplicates) > tHiveOutput
The components schema contains BigDecimal type columns.
Note: This problem does not occur when using a non-BigDecimal column type in the components schema.
Root Cause
This is a known bug.
Solution
From Talend Studio 6.4.1 apply the patch: Patch_20170804_TPS-2077_v1-6.4.1, available from Talend Support.
To apply the patch manually, perform the steps indicated in the readme.txt included in the patch file (Patch_20170804_TPS-2077_v1-6.4.1.zip).