Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Contributor II

1 script, 3 tables with 3 different load times


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



4 Replies
Honored Contributor II

Re: 1 script, 3 tables with 3 different load times


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.

Not applicable

Re: 1 script, 3 tables with 3 different load times

Hi Elen_pip,

  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

     Load ......

     Store .......




Contributor II

Re: 1 script, 3 tables with 3 different load times

Hello Whiteline

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



Contributor II

Re: 1 script, 3 tables with 3 different load times

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.