1 Reply Latest reply: Jul 20, 2016 3:07 PM by Mahesh Kumar Kuttappa RSS

    Add or Update Data in QVD through QMC

    Azmina Virani

      I created this load to bring in data, I now need to push this to QMC and set a task but i dont want this to run from start date everytime. I only want it to run and add or update missing data in the QVD that already exist.

      How can I do that?

      Any help will be appreciated.

       

      "LET vStartDate = MakeDate(2015,7,30);      //(2015,7,30);

      LET vEndDate = (TODAY()-1);

       

      Partner:

      LOAD DISTINCT

          DISTRIBUTOR_ID as TIPS_DISTRIBUTOR

      FROM [lib://QVD_Transform/T_Partner.qvd](qvd)

      WHERE "Software Provider" = 'TIPSNETWORK'

      ;

       

       

      FOR vDayNo = vStartDate to vEndDate;

      LET vDate = Date(vDayNo, 'YYYY_MM_DD');

       

       

       

      Temp_SplitterTransaction:

          Load *

          From [lib://QVD_Extract/DailySplitterExtract/E_SplitterTransaction_$(vDate).qvd](qvd)

          WHERE exists (  TIPS_DISTRIBUTOR, ORIGINATING_DISTRIBUTOR_ID) and NOT Exists (TRANSACTION_DATE, TRANSACTION_DATE) ;

       

          //WHERE exists (TIPS_DISTRIBUTOR, ORIGINATING_DISTRIBUTOR_ID);

       

       

      T_TIPS:

          LOAD *

           RESIDENT Temp_SplitterTransaction

          WHERE MATCH (TRANSACTION_CODE, 0, 35);

           

       

      If Not IsNull(QvdCreateTime('lib://QVD_Transform/T_Tips.qvd')) then

       

          CONCATENATE(T_TIPS)

              LOAD  *

              FROM [lib://QVD_Transform/T_Tips.qvd](qvd) WHERE NOT EXISTS([Transaction Date Check], [Transaction Date]);

       

      Endif

       

      DROP FIELD [Transaction Date Check];

       

      STORE T_TIPS INTO [lib://QVD_Transform/T_Tips.qvd];

                    

             

      DROP TABLE Temp_SplitterTransaction;

      DROP TABLE T_TIPS;

       

      NEXT vDayNo

       

      EXIT SCRIPT;"