Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am very new to Qlikview and would like to do incremental load based on the latest time stamp in QVD file.
I stored the initial data on QVD file that has a few columns, where column A is Time Stamp. I sorted the time stamp in the QVD just to ensure all time stamps are in order with below script.
Initial_Data:
LOAD [Time Stamp], B,C,D,E,F
FROM
$(vQVDSave)Initial_data.qvd
(qvd);
Sorted_Record:
LOAD *
Resident Initial_Data
order by [Time Stamp];
LET vLatestRecord = Peek('[Time Stamp]', -1, 'Sorted_Record');
Drop table Initial_Data;
//Load new Records
Latest_Data:
LOAD [Time Stamp], B,C,D,E,F
FROM $(vDataSource) filename.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
Where [Time Stamp] > $(vLatestRecord);
It did not work properly when I reloaded it and keep showing error message
Field not found - <>>
Latest_Data:
LOAD Filed Names....
FROM
where [Time Stamp] >
Any clue? Appreciate any suggestion from the experts in this forum to fix this.
Hi Fikri Shihab,
Did u got the output what u expected..??
pls post the code.
I might have posted a separate discussion on this. You may want to take alook at this. It is solved.
There error mainly because you loading two smillar structure table(Initial_Data and Sorted_Record) as a result they get concatenated. Then you drop the Table Initial_Data and that is why the error message comes
use the NoConcatenate statement after Intial_Data Load to correct the error
everything you need to learn on incremental load
Thanks for the link. Very useful!
Thank You
Hi,
Try this,
Initial_Data:
LOAD [Time Stamp], B,C,D,E,F
FROM
$(vQVDSave)Initial_data.qvd
(qvd);
Latest_Rec:
LOAD max([Time Stamp]) as Latest_Record
Resident Initial_Data;
LET vLatestRecord = Peek('Latest_Record', 0, 'Latest_Rec');
Drop table Latest_Rec;
Latest_Data:
LOAD [Time Stamp], B,C,D,E,F
FROM $(vDataSource) filename.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
Where [Time Stamp] > $(vLatestRecord);
-Joyson G
If your question is now answered, please flag the Correct Answer.
If not, please make clear with what part of this question you still need help .