Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I like to run an incremental load process that does the following:
I’m loading a data on a daily basis and Its yesterday data.
The data is stored in QVD file
At the end of each load, I check the last date that was loaded.
Now I need this to be done in loop until the last day that is loaded is today.
For example:
My max date in the QVD is 30/06/2013,
So I like the load process to keep running until the I got yesterday date.
All the file are named as:
And the max date I’m taking from the QVD is a variable that I use to load the next file.
------------------------------------------------------------------------------------------------------------------------
This is the code that I like to put in a loop until I got yesterday date in the QVD
Incremental:
NoConcatenate
LOAD
@1 as A,
@2 as B
FROM
$(vSourceData)Log.$(vNextFile)
(txt, codepage is 1255, no labels, delimiter is '|', msq);
Concatenate
A
B
$(vSaveQVD)Data.qvd(qvd);
STORE Incremental into $(vSaveQVD)Data.qvd(qvd);
next.load:
load
left(maxstring(date),10) as next.date
Resident Incremental;
let vNextFile= Peek('next.date',-1,'load.date');
drop table next.load;
Thanks.