How To Implement SQL Analytic Privilege in SAP HANA
Analytic privileges control access to SAP HANA data models.
Analytic privileges are used to grant different users access to different portions of data in the same view depending on their business role. It allows us to maintain row-level access.
Analytic privileges are used to grant different users access to different portions of data in the same view depending on their business role. It allows us to maintain row-level access.
SQL privileges implement authorization at object level only. Users either
have access to an object, such as a table, view or procedure, or they do not.
While this is often sufficient, there are cases when access to data in an object depends on certain values or combinations of values. Analytic privileges are used in the SAP HANA database to provide such fine-grained control of which data individual users can see within the same view.
While this is often sufficient, there are cases when access to data in an object depends on certain values or combinations of values. Analytic privileges are used in the SAP HANA database to provide such fine-grained control of which data individual users can see within the same view.
Analytic privileges are intended to control read-only access
to SAP HANA information models (attribute views, analytic views, calculation
views
The attribute restriction of an analytic privilege specifies
the value range that the user is permitted to access using value filters. In
addition to static scalar values, stored procedures can be used to define
filters. This allows user-specific filter conditions to be determined
dynamically in runtime, for example, by querying specified tables or views. As
a result, the same analytic privilege can be applied to many users, while the
filter values for authorization can be updated and changed independently in the
relevant database tables.
Create a calculation View, In Projection_1 select EMPLOYEE_LOCATION Table
Save and Activate the View and see the below output
Now create SQL Analytic Privilege and select the our calculation view .
Restrict the Column EMPLOYEE_LOCATION_AREA with INDIA like below.
Go to security tab select the user and apply Analytic Privilege to that user.
Output:
Wow!! great Post.
ReplyDeleteThanks for providing this amazing information. I think we can expect better success with these tips.
Sap Analytics
Keep Posting:)
We are on HANA 2.0 and using HANA studio (xs) for creating calculation views. Is there an equivalent of _SYS_BI_CP_ALL with SQL privileges? If not, how can developers execute their views without creating analytical privileges?
ReplyDelete