In this chapter we will learn how to create and manage Analytic Privilege.
Here is the sequence of steps to achieve this
To create analytic privileges, the system privilege CREATE STRUCTURED PRIVILEGE is required.
To drop analytic privileges, the system privilege STRUCTUREDPRIVILEGE ADMIN is required.
In the SAP HANA modeler, repository objects are technically created by the technical user _SYS_REPO, which by default has the system privileges for both creating and dropping analytic privileges.
The database user requires the package privileges REPO.EDIT_NATIVE_OBJECTS and REPO.ACTIVATE_NATIVE_OBJECTS to activate and redeploy analytic privileges in the Modeler.
Steps to Create an Analytic Privilege:
In this example we are going to use the calculation view created in the chapter 1. The output of the calculation view is
Here is the sequence of steps to achieve this
- Create Analytic Privilege and assign restriction for region “Asia”.
- Assign the Analytic Privilege to User to restrict the data on HANA Views.
To create analytic privileges, the system privilege CREATE STRUCTURED PRIVILEGE is required.
To drop analytic privileges, the system privilege STRUCTUREDPRIVILEGE ADMIN is required.
In the SAP HANA modeler, repository objects are technically created by the technical user _SYS_REPO, which by default has the system privileges for both creating and dropping analytic privileges.
The database user requires the package privileges REPO.EDIT_NATIVE_OBJECTS and REPO.ACTIVATE_NATIVE_OBJECTS to activate and redeploy analytic privileges in the Modeler.
Steps to Create an Analytic Privilege:
In this example we are going to use the calculation view created in the chapter 1. The output of the calculation view is
Let us see how we can restrict the output only for "Asia" region.
1. Right click on the package and select “Analytic Privilege”
2. Specify Name and label for the Analytic Privilege
3. Select the calculation view and click on Add button. Then click on “Finish”.
4. Click on Add button as shown below and select the column REGION_NAME.
5. Now we need to assign the restriction. Click on the add button as shown below and select the value “Asia”.
6. Save and activate the analytic privilege.
The analytic privilege is ready. Now we can assign this analytic privilege to any user.
Assign Analytic Privilege to a User:
Note: You must have authorization to create/assign privileges to a user.
1. Go to Security -> Users. Right click and create a new user. Specify user name and password.
2. Click on the “Analytic Privileges” tab and add the analytic privilege created in previous step.
3. You also need to assign following privileges required to get access to modeling views.
- Execute & Select access on _SYS_BI
- Execute & Select access on _SYS_BIC
- Execute on REPOSITORY_REST
Done!! We have created an analytic privilege and assign that to a user.
Now add the same HANA system using new user. Open the data preview of the same calculation view. It will show only the data for region “Asia”.
No comments:
Post a Comment