cancel
Showing results for 
Search instead for 
Did you mean: 

One record missing during HANA Aggregation

mauro_blanc3
Active Participant
0 Kudos

Hi All, I'm facing a strange behavior when using an aggregation node on my CV.

I have the following projection node

I need to have aggregated the fields re_menge, re_wert, we_wert and we_menge, so I remove BELNR VGABE, DEC_DMBTR, DEC_MENGE and SHKZG in order to to so.

The expected result should be one line with the following:

re_menge: 0,4

re_wert: 262000

we_wert: 262000

we_menge: 0,4

But instead I got this:

It looks like is either a record missing, or the aggregation is just reading the first record.

this is how my aggregation node is defined:

Any help will be very much appreciated.

Thanks!.

michael_eaton3
Active Contributor

I assume re_menge, re_wert, we_wert, and we_menge are calculated columns? if so, your issue starts there. I would guess they are being calculated after aggregation.

Michael

mauro_blanc3
Active Participant
0 Kudos

Hi michael.eaton3

Yes, they are calculated columns but are calculated before the aggregation happens (in previous aggregations/joins)

michael_eaton3
Active Contributor
0 Kudos

If you provide the details of the previous operations we might be able to help.

I'm sticking with my guess that they are being calculated after aggregation.

View Entire Topic
michael_eaton3
Active Contributor

I replicated your scenario, and the good news is that HANA works as expected. The issue must be in your implementation.

My source table

My projection node

I guessed that your calculated columns are defined something like

  • re_menge - if("VGABE" = '1', 0, if("SHKZG" = 'S', "DEC_MENGE", "DEC_MENGE" * -1))
  • re_wert - if("VGABE" = '1', 0, if("SHKZG" = 'S', "DEC_DMBTR", "DEC_DMBTR" * -1))

My projection node data preview with 2 calculated columns

My aggregation node

My aggregation node data preview

Michael

mauro_blanc3
Active Participant
0 Kudos

Hi michael.eaton3 thanks for your help!. I found that, indeed, the issue was in my implementation.