Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
techvarun
Specialist II
Specialist II

QVD Date Range

Hi,

   I have a qvd with 13 lakh records and am using

'ModDate >= '$(VDate1)' and  ModDate <= '$(VDate2)' ' this condition to fetch records. but once the qvd is reloaded its holding the records only in between the two dates and my next reload am only able to fetch the data between these dates.


for that each and every time i need to comment the condition reload the entire qvd and doing the range selection. any solution for this issue.

Thanks in advance

6 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Does your script contain a STORE statement somewhere after your LOAD, that overwrites the QVD? If I understand you correctly, it looks like you write back your selection of records, only to discover later on that all records that don't match this condition have disappeared from the QVD. Or am I wrong?

Best,

Peter

Not applicable

Hi

Like Peter I'm not entirely sure of the issue.  Although, from my understanding, it sounds like you are overwriting your qvd with the subset of data in your date range.  To add this new data to your qvd, simply load the subset of data between the dates required, then perform a concatenate load of the old version of the qvd.  THis will combine the datasets before you then save them over the original qvd resulting in no loss of data.

Alternatively, save the individual qvds with the date variable as part of the name all in one sub-folder.  Then perform another load that concatenates all these individual qvds into one consolidated qvd.  I use this method myself in case of any failures/corruption - which has never happened but at least I feel the process is robust.

I hope this helps and I haven't got hold of the wrong end of the stick.  Let me know if this helps.

Regards

Steve

amars
Specialist
Specialist

Hi Varun,

I hope you are trying to use an incremental load. The idea over here is

1. To have a QVD with all the data till last reload i.e. Data till last reload date & Time.

2. First reload all the data till LastReloadDateTime from QVD.

3. Now to Extract new data from database server using Modified Date > LastReloadDateTime and <CurrentDateTime.

4. Now store the LastReloadTime =CurrentDateTime for the next Reload.

5. Now store the QVD with all the data till last reload and the new data extracted from the database Server.

I hope you not reloading the Old Data from the QVD. Please check in your reload schedule for step 2.

Thanks...

techvarun
Specialist II
Specialist II
Author

Hi All,

I have 2 datepickers named fromdate and todate and and a button with action reload.
when i select fromdate and todate and click the button it will fetch the value between the dates i have selected based on this "'ModDate >= '$(VDate1)' and  ModDate <= '$(VDate2)"condition.

for example my fromdate is 22 Aug 2013 and todate is 28 Aug 2013 it is fetching the values perfectly.

now the problem is when i try to fetch the values between any other dates out of the range between  22 Aug 2013 and  28 august 2013. it returns an empty set

means when i try to fetch values between 22 Aug 2013 and 24 Aug 2013 its running perfect and same condition for fromdate 20 Aug 2013 and todate 21 Aug 2013 returns an empty set

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Just some more questions to get into the heart of your issue:

  • The button you mention really does a reload of the QVD via your load script? Or does it force a selection in the ModDate field in the UI so that a different filter is applied to your tables?

  • You're sure the  QVD contains data for aug 20 and aug 21?

Best,

Peter

Not applicable

Can you share the file?  It would be good to see to help unpick.

As a long shot, you're button is not reducing the data is it?  As this drops the data from memory, therefore a new exclusive selection would mean the data has already gone.  It's something that I've seen before and initially had me scratching my head.