Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Chalorme
Partner - Contributor II
Partner - Contributor II

Qlik Reload Holding depending upon latest available date

Hi,

can anyone please share some script by which will check the latest date from backend table - and depending upon that how you’re holding or triggering the qlik app reload? 
cause I am facing a serious problem , where on some days backend table procedure is still overrunning & our qlik app is getting reloaded in between that , as per schedule - and sometimes due to this refresh timings syncing issue dashboard is populating null records - so how can we avoid it ?

my date field is “update_date”. 

example : if update_date <= timestamp#(today()) then hold else reload - but how we can write it , whether we should use loop or what exactly? 

I am not going to put my app in sleep because there is no guaranty after keeping app in sleep for 2hours also our backend table refresh will be completed. So looking for some alternative scripting option.

Any help would be appreciated.

#qlikreload #scripting

Chalorme Roy Mukherjee
2 Replies
pravinboniface
Creator II
Creator II

@Chalorme The most reliable way I have seen is to have a scheduler like Control M. That way, your Qlik script will be triggered only there is new data.

I have not seen any perfect solution that can be implemented in the script.  You have to keep polling to see if the table is updated, and if not, you have to put your application to sleep.

Rohan
Specialist
Specialist

Hi,

You maintain you last procedure completion timestamp in another table. Then you can check with your qvd last creation time & the aforementioned table's max timestamp like :

Temp :

Select max(timestamp) as lastupdatetime from Time_Table;

let vTablemax=num(timestamp(num(peek('lastupdatetime',0,'Temp'))));

drop table Temp;

QVD :
LOAD
CreateUtcTime,
ConvertToLocalTime(CreateUtcTime,'Your TimeZone') as LocalTime

FROM qvd
(XmlSimple, table is QVD);

let vQVDTime=num(timestamp(num(peek('LocalTime',0,'QVD'))));

if vTablemax < vQVDTime then

Trace 'No New Data';

drop table F;

else 

Your Load Script ;

end if;

You can then put this on hourly schedule.

Let me know if any issues.

 

Regards,

Rohan.