6 Replies Latest reply: Oct 8, 2015 11:31 AM by Shilpa Saboo RSS

    Section access script joining several QVDs.

    Shilpa Saboo

      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;