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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
william_denholm
Contributor III
Contributor III

Update QVD Hourly

Hello,

We have a requirement to update our QVDs from a database table hourly. Using the Insert, Update & Delete option, so that the QVD data will match the database table each reload.

Have been using Reloadtime() but this is when the last reload completes, not when it starts.

Is there a way to either get the last start time that the QVW was reloaded or use Peek to check the latest modified time within the QVD?

Current code is as follows:

Let vThisExecTime = Now( );

Let vLastExecTime = Reloadtime();

TABLE:

SQL SELECT *

FROM DBTABLE

WHERE TIMEMODIFIED >= TO_DATE('$(vLastExecTime)', 'DD/MM/YYYY HH24:MI:SS')

AND TIMEMODIFIED < TO_DATE('$(vThisExecTime)', 'DD/MM/YYYY HH24:MI:SS');

Concatenate LOAD *

FROM TABLEQVD.qvd (QVD)

WHERE NOT Exists(PRIMARYKEY);

INNER JOIN

SQL SELECT PRIMARYKEY

FROM DBTABLE;

STORE TABLE into TABLE.qvd (QVD);

3 Replies
pokassov
Specialist
Specialist

Hello!

You can use this way:

t1:

Load max(TIMEMODIFIED) as TIMEMODIFIED

from TABLEQVD.qvd (QVD);


let vLastExecTime=peek('TIMEMODIFIED',0,'t1');

drop table t1;

    

Anonymous
Not applicable

Maybe you can write something like this,

Let vLastRLStartTime = vThisExecTime;

before your code starts...

Let vThisExecTime = Now( );

Let vLastExecTime = Reloadtime();

Miguel_Angel_Baeyens

Hi William,

Are you using Publisher? You can set up an hourly task that reload whichever QVDs you need to update or complete QVWs.

Miguel