5 Replies Latest reply: Dec 7, 2012 2:44 AM by whiteline _ RSS

    Precedent Load vs Resident Load

    Srikanth P

      Hi Folks, I am trying to create one intermediate QVD and first I tried with Precedent Load:

       

      FINAL_QVD:

      LOAD *,

           SubField(A,'.',1) as X,

           SubField(A,'.',2) as Y,

           ApplyMap('MAP_T',AutoNumber(LEFT(A,LEN(A)-3)),'No') as FLAG

      ;

      LOAD DISTINCT A,B,C,D FROM [$(vQVDpath\TEST_CHECK.qvd)] (qvd);

       

      The TEST_CHECK.qvd have 4M rows

       

      For this code I got 4M rows in FINAL_QVD table also. But I am expecting only 1M ditinct rows only.

       

      Again, I re-write my script with Resiednt Load below:

       

      T:

      LOAD DISTINCT A,B,C,D FROM [$(vQVDpath\TEST_CHECK.qvd)] (qvd);

       

      FINAL_QVD:

      NOCONCATNATE

      LOAD *,

           SubField(A,'.',1) as X,

           SubField(A,'.',2) as Y,

           ApplyMap('MAP_T',AutoNumber(LEFT(A,LEN(A)-3)),'No') as FLAG

      RESIDENT T;

       

      DROP TABLE T;

       

      With this, I got 1M rows in my new table FINAL_QVD.

       

      I wonder, what is wrong with precedent load

       

      What is the difference b/n Precedent Load & Resident Load

       

       

      Thanks,

      Siri