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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to update qvd file

hi,

how to update the qvd file with modified data

i am new to qlik vies please help me.

Thanks in Advance

6 Replies
Not applicable
Author

Hi,

One possible way:

- First read records from the old QVD file to the table, let's say 'NewQVD'

- Concatenate new data to the table 'NewQVD'

- Override existing QVD file using STORE NewQVD TO 'PathToOldQVDfile'

I hope it will help you.

Kind regards,

Janusz

Not applicable
Author

hello,

you can try 

"load

*****

from myold.qvd

concatenate

load

****

from mynew.qvd

where not exists(keyprimary);

store *.qvd to *.qvd

"

so new record will be added in your  *.qvd et old record will be updated if the record had been modified

villegasi03
Creator
Creator

noelgreg,

I can see from your example that the script by using the "where not exists(keyprimary);" statement would add new records but I dont understand how it would update the records in the "myold.qvd" file. This is where my thought process takes me:

  • Record from "myOld.qvd"
    • primarykeyfield, A, B, Y, Z, LastModifiedDateField (value = 1/1/2012)
  • Same record from original source but after modification
    • primarykeyfield, A, B, Y, Z, LastModifiedDateField (value = 1/2/2012)

So since primary key field didnt change your code would not update the record. I am not an expert by any means I so I could be completely missing something. I am just looking for a solution for the same posted question.

swuehl
MVP
MVP

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.

Stefan

villegasi03
Creator
Creator

swuehl,

Thank you for your response. I am as a matter of fact using the cookbook which I was about to test. I figured I would try to get a better understanding before diving into full testing. I was about to post a question about updating a qvd which was created form joining more than one SQL table so I will just do that on a new thread.

Thanks

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Perhaps your confusion in this thread and the other similar thread is that for updates, the examples in this thread are backwards. You should load the changed (delta set) records first, and then concatenate load the old records with "where not exists(primarykey)".

-Rob