on 2021 May 31 2:10 PM
Hi All,
There is a business requirement to create a graphical calculation view in SAP HANA to fulfill below criteria:
In this scenario, predefined access table is explained below.
The expected output with above access table should be as below:
We would like to implement this in our project with graphical calculation views being called from user of same tenant or cross tenant.
Kindly guide us..
Thanks & Regards,
Krina
Request clarification before answering.
Hi Krina,
What you are tyring to achieve, is not possible completely based on graphical way of modelling, or at least I am not aware of any such supporting ideas. If you are not having the possibility to use table function, I assume you can use a scripted calculation view instead. But I am afraid you need to create a new calculated column with respect to each column to use a reference to your authorization table. The calculated column can be defined as following : for example the one for COUNTRY :
CASE WHEN "VIEW_ATTRIBUTE_NAME" = 'COUNTRY' THEN "COUNTRY" ELSE '' END;
However, prior to this you need to make two things :
1. inner join with between the authorization table & the scripted calculation view/table function returning session_user on ID = SESSION_USER.
2. Referential join between the actual data with the above said join node.
On the referential join node you can define these calculated columns & add an aggregation node on top of it & add these calculated columns as aggregated columns as MAX since you are joining between two mutually transposed nodes.
Make sure you set the keep flag value set to 'True' on necessary fields to get the correct output.
You don't need a column for each user, but definitely need an extra column to be created for each existing column to apply the above said logic of showing actual value or blank.
The model would look somewhat like below :
Best Regards,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
Thanks for the alternative solution shared here.
I tried creating the simple SQL scripted view in one tenant. the data preview is working for that tenant. However while calling the same view from different tenant (the connection is already established and working for all other cross tenant) it is throwing below error.
feature not supported: Cross database access of procedure/function is not supportedUser | Count |
---|---|
53 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.