Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

incremental load

how can i load new inserting data in data base .

i did use where condition but it will come total data so i dont want total data i want only newly inserting data pls kindly solve this problem

i did attach file what did am i done

Labels (1)
2 Replies
Not applicable
Author

Please check the incremental load sample in the QV cookbook ( available here:http://robwunderlich.com/downloads/ ). It should explain quite nicely how to handle new / updated / deleted records.


Thanks!

sudeepkm
Specialist III
Specialist III

a simple approach can be followed like below.

//create an old date as base date

let vDate = Date(0,'MM/DD/YYYY');

if(QvdCreateTime('customer.qvd')>0) then

     loadorderdate:

     load max(OrderDate) as mxdt from customer.qvd(qvd);

     let vDate = Date(peek('mxdt',0,'loadorderdate'),'MM/DD/YYYY'); // update the vDate with max OrderDate

     drop table loadorderdate;

endif

Customer:

load *, OrderDate from Customer where OrderDate > '$(vDate)'; // Only new orders will be loaded from the source

//rest of the data to be loaded from QVD

if(QvdCreateTime('customer.qvd')>0) then

     concatenate load * from customer.qvd(qvd);

     // where not Exist(CustomerID) // use this where clause if you want to update the records

end if

store Customer into Customer.qvd(qvd);