Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section access script joining several QVDs.

The first script fails on the first Load says SamAccountName is not found.

If I load the AD_ROLE QVD before section acces like in script 2 it succeeds and security works.  I am not able to understand why.

Is there a logical explanation for this

?

Script 1> Failing Script
Section Access;

AD_ROLE:

LOAD   DISTINCT 'WT001\' & UPPER(SamAccountName) AS NTNAME,

UPPER(CountryC) AS AD_COUNTRY_ID

FROM Employee_Information.QVD (qvd);

INNER JOIN(AD_ROLE)

LOAD UPPER(AD_COUNTRY_ID) AS AD_COUNTRY_ID,   

UPPER(SECURITY_ROLE) AS SECROLE

FROM COUNTRY_ROLE_MAPPING.QVD (qvd);

SECURITYUSER:

LOAD DISTINCT 'USER' AS ACCESS,

  'WT001\' & UPPER(NT_USER_NAME) AS NTNAME,     'POWER' AS SECROLE

FROM POWERUSER.QVD (qvd)  ;

Concatenate(SECURITYUSER)

LOAD 'USER' AS ACCESS,       NTNAME,      SECROLE RESIDENT AD_ROLE;

INNER JOIN(SECURITYUSER) LOAD CMPNY_CODE_ID AS  %CMPNY_CODE_ID ,

  UPPER(SECURITY_ROLE) AS

FROM COMPANY_CODE_ROLE_MAPPING.QVD (qvd);

Section Application;

Script 2>The script that works by just moving some code out of section access.:

AD_ROLE:

LOAD   DISTINCT 'WT001\' & UPPER(SamAccountName) AS NTNAME,

UPPER(CountryC) AS AD_COUNTRY_ID

FROM Employee_Information.QVD (qvd);

INNER JOIN(AD_ROLE)

LOAD UPPER(AD_COUNTRY_ID) AS AD_COUNTRY_ID,   

UPPER(SECURITY_ROLE) AS SECROLE

FROM COUNTRY_ROLE_MAPPING.QVD (qvd);


Section Access;

SECURITYUSER:

LOAD DISTINCT 'USER' AS ACCESS,

  'WT001\' & UPPER(NT_USER_NAME) AS NTNAME,     'POWER' AS SECROLE

FROM POWERUSER.QVD (qvd)  ;

Concatenate(SECURITYUSER)

LOAD 'USER' AS ACCESS,       NTNAME,      SECROLE

RESIDENT AD_ROLE;

INNER JOIN(SECURITYUSER)

LOAD CMPNY_CODE_ID AS  %CMPNY_CODE_ID ,

  UPPER(SECURITY_ROLE) AS

FROM COMPANY_CODE_ROLE_MAPPING.QVD (qvd);

Section Application;

6 Replies
Anonymous
Not applicable
Author

hi shilpa,


section access is for giving access and reducing data on user profile.

its not for creating data model(like extracting data from QVDs.)

qlikviewwizard
Master II
Master II

Can you explain in detail how you implemented security?

In general we implement on the qvw files.

rubenmarin

Maybe is trying to do an optimized reload, wich can fail in section access, try adding "Where 1=1":

Section Access;

AD_ROLE:

LOAD   DISTINCT 'WT001\' & UPPER(SamAccountName) AS NTNAME,

UPPER(CountryC) AS AD_COUNTRY_ID

FROM Employee_Information.QVD (qvd) Where 1=1;

Not applicable
Author

Yes I agree. I am just trying to built the User list by joining different QVDs.

Not applicable
Author

Yes this code is in qvw file.

The code is just creating the User list with NTName and what Company Code they have access to.


Not applicable
Author

Tried it. Did not help.