Skip to Content

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:-

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;


}

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.

Capture.PNG

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Karthik Ravikumar

    Hi Gowrisankar,

    Thanks for the detailed steps. I have created an Analytical View with trial Account followed by XSOdata service. When I activate the service, I get the error “Files cannot be written into the repository root package”. Is it really necessary to create roles in this case? especially Step 3 and Step 6. If so can you please provide the detailed steps.  I also have the HANA DB user access.

    (0) 

Leave a Reply