Quantcast
Viewing all articles
Browse latest Browse all 3285

Exposing AnalyticView as odata in SAP HANA Cloud Platform (Trial Account)

Exposing Analytic view as odata-->Please follow below mentioned steps to expose your analytic view as Odata, which is present in the HCP Trial.

 

Step 1:- Create your Analytic View in HANA trial account.

 

Step 2:- As per the privileges assigned to the developers in the trial HANA account,only calculation views can preview the data.

So we need to convert the analytic view into a calculation view by creating a dummy Calculated Column - Attribute as shown below:-

 

Image may be NSFW.
Clik here to view.
Capture.PNG

Step 3:- Open the SQL console and run below command to provide Select Rights for Activated Modeled Views. [Now you can see your view in _sys_BIC-->Column views]  CALL "HCP"."HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS";

 

Step 4:- Create a XSodata file for exposing analytical view as odata like mentioned below,

 

service namespace "mynew.data"

{

    "XXXXXXXtrial.gowri::ANA" as "Ana" keys generate local "new"

    aggregates always;

   }

 

Step 5:- create a role, to access your created model.

 

role xxxxxxxxtrial.gowri.mynew.role::model_access {

 

sql object xxxxxxxtrial.gowri:CD.analyticview : SELECT;

sql object xxxxxxxtrial.gowri:ANA.analyticview : SELECT;


}

Image may be NSFW.
Clik here to view.
Capture.PNG

 

Step 6:- Grant created role to your user by running below query,

 

call "HCP"."HCP_GRANT_ROLE_TO_USER"('xxxxxxxtrial.gowri.mynew.role::model_access', 'xxxuseridxx')

 

Check:-

Now check your exposed analytic view as odata via browser.

Image may be NSFW.
Clik here to view.
Capture.PNG


Viewing all articles
Browse latest Browse all 3285

Trending Articles