[resolved] Exception in component tAggregateRow (BigDecimal average&sum)
Hi
search in several forums, but cannot find how to resolve my aggregation bug :
Exception in component tAggregateRow_1_AGGOUT
java.lang.NumberFormatException
at java.math.BigDecimal.<init>(Unknown Source)
at java.math.BigDecimal.<init>(Unknown Source)
In the tMap :
- I first transform the Integer columns into BigDecimal (define variables to do that) :
Var.NbrSonnAbouti:
row1.DUREE_SONN_ABOUTI==null?null:new BigDecimal(row1.DUREE_SONN_ABOUTI)
- Then a division is performed on 2 columns in the right editor :
For NBR_SONNERIES_ABOUTI column :
Var.NbrSonnAbouti==null?null:Var.NbrSonnAbouti.divide(new BigDecimal(5),2,BigDecimal.ROUND_CEILING)
Same for NBR_SONNERIES_NON_ABOUTI column