cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation view with Graphical Vs Script?

Former Member
0 Kudos

Hi all,

Can anybody provide an example for the scenario, when we need to go for a calculation view using scripting approach rather than Graphical approach?

I just want to know any specific functionality that can't be done using graphical approach?

Thanks,

Sree

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This is a fun question.

There used to be a time when we used Scripted views all the time. They used to be much faster and provided control of the calculation engine, which was much needed in HANA SPS02.

These days we always use Graphical views as a preference because HANA's optimizer is so much better. The Graphical modeler will almost always provide better performance. it creates Calculation Scenarios which are generally very well optimized even for quite complex scenarios. Still, there are a few scenarios where the Scripted views will win out:

- Flow control. CE Functions can provide more control, when the Graphical modeler gets it wrong. For certain scenarios you can get better control.

- SQL. You can combine SQL with CE functions to great effect. For example some functions like PERCENT and RANK are not available. Also you can use COUNT DISTINCT in a Script but the counter function in the Graphical modeler is not as optimal. Same with non-equi joins.

- PAL and BFL. These can be combined in scripts but not in the graphical modeler.

Overall, I consider the Script modeler to be a measure of last resort because it is less flexible, often slower because it can materialize large data volumes and harder to support. Also the Graphical modeler has most of the development effort due to HANA Live and BW on HANA.

Former Member
0 Kudos

Thank you all for your great responses   !!

Regards,

Sree

Former Member
0 Kudos

Hi Sreedhar,

If your calculation involves a non-equi join then you cannot use graphical CV's. You have to either write stored procedures or Scripted CV's.

Regards,

Rahul

former_member186082
Active Contributor
0 Kudos

Hi Sreedhar,

In Graphical model, very few functions are supported in calculated measures. Functions like RANK(), DENSE_RANK(), PERCENT_RANK(), etc cannot be implemented in graphical models. In these scenarios, we have to go with scripted views.

Hope this clears your doubt.

Regards,

Chandra.