I am trying to use incremental load so that tables load faster and are less taxing on our server. The code seems straight forward enough. However, when I run it, no new rows are loaded, even though the DATE_UPDATED field is clearly different between the two sources.
My only thought is that the TO_CHAR function is not working or the date format is incorrect and the variable (vC3Data) is being ignored in the where clause.
load max(DATE_UPDATED) as Last_Update_Date
FROM [$(LoadPath)C3Data_old.QVD] (QVD);
let vC3Data = date(peek('Last_Update_Date',0,'LoadTime'),'YYYY-MM-DD HH:MMS');
drop table LastUpdate;
load max(DATE_UPDATED) as Last_Update_Date;
SQL SELECT DATE_UPDATED
let vPR = date(peek('Last_Update_Date',0,'LoadTime'),'YYYY-MM-DD HH:MMS');
drop table FromSource;
'No' as New;
SQL SELECT *
FROM "CARISMA3_TRACKWISE".PR where (PROJECT_ID = 21 or PROJECT_ID = 22 or PROJECT_ID = 34 or PROJECT_ID = 35 or PROJECT_ID = 24 or PROJECT_ID = 37 or
PROJECT_ID = 23 or PROJECT_ID = 36 or PROJECT_ID = 25 or PROJECT_ID = 38) and TO_CHAR(DATE_UPDATED,'YYYY-MM-DD hh:mm:ss') > '$(vC3Data)';