Qlik Community

QlikView Security & Governance

Discussion Board for collaboration on QlikView Security and Governance.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
neetha_p
Honored Contributor

Re: Section access script joining several QVDs.

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.)

Arjunarao
Honored Contributor II

Re: Section access script joining several QVDs.

Can you explain in detail how you implemented security?

In general we implement on the qvw files.

Re: Section access script joining several QVDs.

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

Re: Section access script joining several QVDs.

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

Not applicable

Re: Section access script joining several QVDs.

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

Re: Section access script joining several QVDs.

Tried it. Did not help.