Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
Greeting for the day. I need assistance for loading data at perticular time frame. At present I'm looking for loading data on hourly bases and capture the load time in some variable, so I can depict that on report.
I have a script which load and modify data. Should like to update at hourly bases. At present from csv file, but once got link with DB then directly.
For any query please write back.
Regards,
Sagar.
@Sagar082 why don't you just schedule the refresh of the app. In scheduler setting you can select the option to run it every hour
Not completely clear what you are asking for .
do you have a qlik server? if so you can schedule the reload there.
Hi Dilipranjith,
Greeting for the day. What I am looking for the algorithm which can run the script at every one hour interval.
For e.g.
Let ThisExecTime = Now( );
if (Minute(ThisExecTime) - Minute(LastExecTime) > 59,
Tabel1:
Load
-
-
-
From File;
Tabel2:
Load
-
-
-
From File;
Tabel3:
Load
-
-
-
From File;
drop Table 2;
Let LastExecTime = ThisExecTime;
Something like this but not getting clue.
Summarizing, I am looking for the code which can check the system time and last modified time, if the difference between it is greater than 59 minutes. Then entire script should be run.
Also, I need to capture the last modified date and time to depict on the report.
I hope this will help you to understand.
Regards,
Sagar.
@Sagar082 why don't you just schedule the refresh of the app. In scheduler setting you can select the option to run it every hour
HI Kush/Dilipranjith,
Greeting for the day. So, do you suggest that I should use scheduled the load instead of adding code to it.
Regards,
Sagar.
yes. you schedule the load.
you add something in code only if there are conditions to satisfy based on time . even then you schedule on server and then add conditions in code
Hi Kush/Dilipranjith,
Greeting for the day. Thank you for the solution. My query will be answered by scheduling, hopefully.
But, what I was looking was to test the condition in the script and without having any store variable in the data tables.
I wrote the logic like mentioned below and it is working fine.
Let vRunTime = Num(Now());
Table1:
Load
.
.
from;
Table2:
Load
.
.
from
where Hour($(vRunTime))-Hour($(vLastRunTime)) >= 01 or Hour($(vLastRunTime))-Hour($(vRunTime)) >= 01;
Table3:
Load
.
.
from;
Let vLastRunTime = if (Hour($(vRunTime))-Hour($(vLastRunTime)) >= 01 or
Hour($(vLastRunTime))-Hour($(vRunTime)) >= 01, $(vRunTime), $(vLastRunTime));
I'm replying this code, so someone who keen to get help, will get it.
Regards,
Sagar.