16 Replies Latest reply: Oct 18, 2017 8:30 AM by Chandra Sidda RSS

    Incremental load issue

    Chandra Sidda

      Hi All,

       

      I have created incremental load in my project. Here I'm facing issue in fetching the incremental data from DB.

       

      EMP:

      LOAD EName, Empid, CreatedDate

      FROM [..\QVDs\Employee.qvd] (qvd);

      Date:

      LOAD max(Timestamp(CreatedDate)) as maxdate

      Resident EMP;

       

      let date_modified = Peek('maxdate',0,'Date');

      DROP Table EMP;

      Incremental_EMP:

      SQL SELECT

      EName, Empid, CreatedDate

      FROM "QV_DB".db.Employee

      where CreatedDate >'$(date_modified)';

      Concatenate

      LOAD EName, Empid, CreatedDate

      FROM [..\QVDs\Employee.qvd] (qvd)

      Where not Exists(Empid);

       

      Inner Join

       

      SQL SELECT Empid

      FROM "QV_DB".db.Employee;

      STORE Incremental_EMP into [..\QVDs\Employee.qvd] (qvd);

       

      The issue is in where condition. when we are fetching data from db by using below condition

       

      where CreatedDate >'$(date_modified)';


      here variable date_modified will store max date. when we load the data from db it is loading data from  max date onwards. but as per our condition it has to fetch data from greater than max date. Please help me to resolve this.


      Thanks,

      Chandra