Discussion board where members can get started with QlikView.
Ihave 3 tables in one script,
1 needs to load every 5 minutes
1 table needs to load every week
and another table needs to laod every month
How do I go about getting these tables to refresh at different intervals of time?
Any advice is greatly appreciated
You could create three qvw files that create corresponding tables and store them into qvd files ('qvd creators').
Use this files to setup automatic or manual reload with intervals you want.
Then create another qvw file that use stored qvd files as source.
This should be reloaded imidiately after the one that reloads every minute.
There could be a problem with reload states when the shorter reload takes more than 5 minutes... but it also can be solved.
I think whiteline's answer is the best approach. However you can set different reload of tabs using some code.
I have a document that is scheduled every hour. The document has various Tabs (in each Tab there is the script for a table) and for one specific Tab I want to reload the data only at 6 and 7 am.
In my first Tab I check what time is it and I raise a flag if it is 6 or 7 am. Then my specific tab will run only if the flag = 1. You can reuse this code for days, weeks, etc.
Here is the code:
On the first tab
LET vReloadStart = now();
LET vSpecialReload = 0;
IF hour(vReloadStart) = 6 or hour(vReloadStart) = 7 then
LET vSpecialReload = 1;
Then the code of my specific Tab is inside this instructions:
IF vSpecialReload = 1 then
Thank you for this information. I have been playing around with your concept
I have created a QVD file and on the server I am reloading every 3 minutes
I also have a QVW file which is looking at the QVD file which loads every 3 minutes. On the server I am getting this file to LOAD "on event of another task" being succesful
You mention that if I have QVW's which take longet than 5 minutes to LOAD, there could be problems. I will have this scenario come up and wondered how this could be solved
Any advice would be greatly appreciated
Well here is the way I will do this (Assuming that you store QVDs)
1 - Create a QVW file and let us name it as ETL.QVW
2 - The QVW will be scheduled to run on every 5 minutes interval.
3 - "1 needs to load every 5 minutes" --> No need for any if statement before the LOAD statement of this table.
4 - "1 table needs to load every week" --> I will read from the stored QVD and check when it was last updated, IF TODAY() - LAST_UPDATE >= 7 days THEN LOAD ELSE Ignore.
5 - "and another table needs to laod every month" --> The same as above but I will check if its 30 days? or 29 days..
You may require an additonal column in the QVDs with LAST_UPDATE field.