Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have created a Qlik Sense (Enterprise Edition) Dashboard in Test Environment and now trying to apply Section Access using a single field.
I have made used of Excel File for ACCESS, TNAME and Reduction Field. Attached is the pic for the same.
I am the Admin of the App and this is the data that I have used in Excel.
ACCESS | NTNAME | Cost centre number |
ADMIN | APAC\U875266 | * |
ADMIN | APAC\u978519 | * |
USER | APAC\s950167 | * |
USER | APAC\s950164 | * |
USER | APAC\s950161 | * |
USER | APAC\s950158 | * |
Section Access Code in QS:
FECC:
LOAD
"ACCESS",
NTNAME,
"Cost centre number" as "Cost Centre"
FROM [lib://QA_FE_Section_Access (apac_u978519)/QS FE Section Access.xlsx]
(ooxml, embedded labels, table is Sheet1);
Concatenate(FECC)
LOAD Distinct 'DUMMY' as NTNAME,
"Cost Centre"
Resident MRH2_Master_Data;
SECTION Access;
STAR is *;
LOAD Distinct Upper(ACCESS) as ACCESS,
Upper(NTNAME) as NTNAME,
[Cost Centre]
Resident FECC;
SECTION Application;
DROP Table FECC;
I have followed this YouTube Video for reference: Section Access using a Database Query - YouTube
I have already created a task in QMC and reloaded the App there. Attached is the pic.
The App is added in the DFS_FE Stream. Attached is the pic.
Now, I have refreshed the Qlik Hub and trying to access but I am getting "Access Denied".
Please please help me figure out where I have been going wrong.
Thanks in advance.
Pradnya Pampatwar.
You are making this SA script very complex for unknown reason.
It is quite simple
You have your SA table in XL
In your XL in first line add below row
USER, INTERNAL\sa_scheduler *
all the ACCESS field should be USER do not give any one as ADMIN
The field name should NOT be NTNAME.. it should be USERID
For Cost Center, make sure you use case sensitive (all in caps, even the field name) and add the values which you want to restrict within that script, avoid concatenation.
That would be your SA table
Now in your script
Section Access;
Star is *;
Load
ACCESS,
USERID,
COST_CENTER
From......;
Section Application;use below
Here the trick is to also make sure your Fact table has upper for Cost Center..
in your fact use below
Upper([Cost Center]) as COST_CENTER
Now both the name matches in SA table & Fact.. data would be reduced based on that.
If you are an admin then for COST_CENTER field in SA XL table just give * to you and sa_scheduler account.
For rest of the users give your COST_CENTER values you want to restrict.
Better if you can upload your SA XL file?
If you get locked out then right click on the app, open without data.
Thanks Shahbaz. What I came to know from friend that I am giving "All / *" access to Users that I defined in Excel Sheet; instead I simply need to go Streams in QMC and give the Users required access there.
Kindly correct me if wrong.
Are you restricting users based on data or application or stream?
If it is data reduction use Section Access (Please provide your SA xl file)
if it is App restriction use QMC in Security Rules, bit tricky
If it is Stream restrictions, use QMC
Search for Sheet/App/Stream level security in Qlik community.. you'll find lot of post on that,