cancel
Showing results for 
Search instead for 
Did you mean: 

Perform logic in calculated column or Data Services?

Former Member
0 Kudos

Hello all,

I need to move the data from SAP HANA to another location using Data Services.

I need to have a derived column based on some logic. There are about 12 conditions.

Is it better to have a calculated column in HANA and just use that calculated column in Data Services, or should i perform the calculation in Data Services when moving the data?

Any advice on this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey,

We had used both the scenario's in my earlier projects:

scenario 1: We had too much of performance issue at HANA side and we didn't want to overload the HANA server again with these operations, hence we moved these calculations to BODS.

Scenario 2: Client was very specific on the BODS jobs completion time,  and to improve the overall bods jobs performance we did the calculation on the HANA side and BODS had plain one to one mapping.

Its the call you need to take based on Hana Server Load vs Bods job Performance.

(My suggestion: Hana operation is expensive and if delay is accepted, its better to do it on BODS)

Regards,

Deepak

Answers (1)

Answers (1)

anindya_bose
Active Contributor
0 Kudos

Hi

It depends on the type of calculation you perform . Without knowing the actual scenario it would be very difficult to comment on this.

If you are joining multiple big tables to derive that field , you probably would like to do that in HANA.

However, if the derived field only depends on 12 fields from the same row , then in all probability HANA and BODS would perform similar.

Cheers

Anindya

Former Member
0 Kudos

Hello, Thank you for the response, The calculation is just on one field (twelve conditions) If match(field, "A*") then "AAA" else if match(field, "B*") then "BBB" else if..

anindya_bose
Active Contributor
0 Kudos

This can easily be done in hana using case statement .

case (  leftstr ( "YOUR_FIELD",1 ) ,'A','AAA' , 'B' ,'BBB' , 'C', 'CCC', 'XXX' )

it will take first character of your field and if that is A ----> AAA

                                                                          B------> BBB

                                                                          C------->CCC

                                                                For all other values -----> XXX

Check  run time before doing this, and compare it after defining this in HANA model.  I think hardly it would make any difference in performance.

In my opnion , It would not make much difference if you do it in HANA or somewhere else.

Cheers

Anindya