[resolved] Exception in component tAggregateRow (BigDecimal average&sum)

Highlighted
One Star

[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

Accepted Solutions
One Star

Re: [resolved] Exception in component tAggregateRow (BigDecimal average&sum)

Resolved.
The 'Ignore null values' have to be checked for all the colums in the tAggregate (first, I've checked only the average ones)

All Replies
One Star

Re: [resolved] Exception in component tAggregateRow (BigDecimal average&sum)

Resolved.
The 'Ignore null values' have to be checked for all the colums in the tAggregate (first, I've checked only the average ones)
Employee

Re: [resolved] Exception in component tAggregateRow (BigDecimal average&sum)

Hi,
Thanks for the feedback devkl!
Best,
Pcoffre.

Re: [resolved] Exception in component tAggregateRow (BigDecimal average&sum)

what is the difference between tAggregateRow and tCombinedSQLAggregate can you please explain with example
Moderator

Re: [resolved] Exception in component tAggregateRow (BigDecimal average&sum)

Hi chandu.jayaprada,
Could you please open a new topic? Your issue is not related to current one.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] Exception in component tAggregateRow (BigDecimal average&sum)

Thank you. This helped resolve my issue

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now