Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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.)
Can you explain in detail how you implemented security?
In general we implement on the qvw files.
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;
Yes I agree. I am just trying to built the User list by joining different 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.
Tried it. Did not help.