Quantcast
Channel: SCN : Blog List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 902

My SAP HANA Studio experiences

$
0
0

Being on an old version of SAP HANA Studio (rev 48) as compared to the server (rev 51), I was not able to access a calculated column from an analytical view in the calculation view SQL script. You also should check the definition of the Analytical view in _SYS_BIC, if it actually has the column (even if it shows it in data preview it might be missing in the definition).

Update to match the server version or higher (I updated to revision 52), reactivate the analytical view and it should show the calculated column in it’s defintion:

 

img1.png

 

Notice I am choosing “dsproten/SHOP_FACTS” and not “dsproten/SHOP_FACTS/olap” (which shows the same Orange Cube icon). If you can find it ending in “/olap”, you are probably on an older SAP HANA Studio version.

For example:

img2.png

This shows my calculated column "QPLUAM":

img3.png

If the column is not listed, the SQLscript in a calculation view will also not see the Calculated column and throw an error.

 

 

After adding a new calculated measure in the analytical view, select “Semantics”. In this example QPLUAM. Aggregation type is set to “NONE” by default.

img4.png

 

When activating it does go through, but with a warning on validation:

img5.png

 

Change the aggregation type to FORMULA and the warning will disappear.

 

  img6.png

And you can proceed to retrieve the value in a Calculation view:

 

img7.png

   var_out = CE_OLAP_VIEW("_SYS_BIC"."dsproten/SHOP_FACTS",["STATE","CATEGORY",SUM("MARGIN"),SUM("QPLUAM")]);

 

 

 

Tip: don’t forget the output is definied at 2 levels, add your Output parameter fields created in the script definition also to the output of the calculation view.

img8.png

Data Preview et voilà!


Viewing all articles
Browse latest Browse all 902

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>