Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi gurus,
i was created a qvd file,if modification is done in database how can update existing qvd file with update data
Thank you
Hi Sunny,
You can use "Incremental Load" ,to add latest added/modifed data in DB.Or else you can go full reload
-Jai
More info can be found in the QlikView reference manual:
25.7 Using QVD files for incremental load
hi prakash,
Thanks for replay but can u explain more clearly,i know how to append the data using incremental load but i dont know how to upload modified data into qvd.
Script Example:
QV_Table:
SQL SELECT PrimaryKey, X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#;
Concatenate LOAD PrimaryKey, X, Y FROM File.QVD
WHERE NOT Exists(PrimaryKey);
STORE QV_Table INTO File.QVD;
Hi Sunny,
If you want to update your qvd file, you need to follow incremental procedure for that you need a primary key column
Look at this here the primary key column is TestDate and based on the max data from this field the qvd is updated.
Hope it gaves you more clarity of what you exactly want.
Sample:
LOAD A,
B,
TestDate,
C
FROM
$(vQvdPath)\Sample.qvd(qvd);
MaxData:
LOAD Timestamp(Max(TestDate),'YYYY-MM-DD hh:mm:ss') as MaxDateTime
Resident LGUIOutputData;
Let vMaxDateTime = Peek('MaxDateTime',-1,Sample);
DROP Table MaxData;
Concatenate
SQL SELECT *
FROM Sample.dbo.TestData
Where TestDate > '$(vMaxDateTime)';
STORE Sample into $(vQvdPath)\Sample.qvd(qvd);
Regards
..............
I was looking for a solution to a similar question I was looking for help on and I how hoping that someone could clearify something for me.
I can see how both the example from rav 1234 and from Sunil Jain would append new records to the new qvd but I am not understanding how these methods would update a record.
If a record in the original source table has a record that all ready exists in your qvd and the record is updated then wouldnt just the lastmodified date field value be the only difference? So why the primary key to update, that didnt change so it would not add the record. My thinking was that you would use a combination of the two fields. Checking for new primary key thus adding new records to your new qvd and then checking existing primarykey fields in both sources to then check if the last modified date field changed?
Hi, I am getting myself familiar with incremental loads , and I found the following "guidelines" in the Qlikview Notes blog ( http://qlikviewnotes.blogspot.co.uk/2012/01/incremental-load-using-qlikview.html 😞
To utilize Incremental Load a source table must have both of the following attributes:
The classic IL logic is this:
BUT My situation is as follows :
My scenario is a bit different. I have multiple excel sheets being stored in a folder ( these are periodic extractions from the same source system, so same fields everytime ), no primary key available ( not at least without building a composite key using several fields...which affects performance seriously..and I disregarded ); also there is not any datestamp column on these files, and the way I manually create a datestamp column is by using part of the file names in the Qview script. So every file stored I name it like : yyyymmdd-abc.xls ( being yyyymmdd the date when I get the extract and store it in the folder ).Then using a "for each a in" ..function I load these files in sequence adding a datestamp field like $(a) as DateStamp. Then all is stored in a QVD file. What I need to accomplish is everytime I do a data reload I need to avoid loading all the xls files again ( and building the whole QVD again )wasting time. I would need the script to only load the newer xls files stored in the folder. Any ideas on how to set it up ?
Thanks a lot
Hey this was a great help to me. Thank you for the all the details you provided.