Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[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
Highlighted
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)

View solution in original post


All Replies
Highlighted
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)

View solution in original post

Highlighted
Employee

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

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

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

what is the difference between tAggregateRow and tCombinedSQLAggregate can you please explain with example
Highlighted
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.
Highlighted
Four Stars

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

Thank you. This helped resolve my issue

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog