Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Sagar082
Creator
Creator

Full load at specific time interval

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.

1 Solution

Accepted Solutions
Kushal_Chawda

@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

View solution in original post

7 Replies
dplr-rn
Partner - Master III
Partner - Master III

Not completely clear what you are asking for .

do you have a qlik server? if so you can schedule the reload there.

 

Sagar082
Creator
Creator
Author

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.

Kushal_Chawda

@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

dplr-rn
Partner - Master III
Partner - Master III

What kush said. If you are trying to hourly /scheduled refresh without a qliksense server that doesn't work
Sagar082
Creator
Creator
Author

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.

dplr-rn
Partner - Master III
Partner - Master III

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

Sagar082
Creator
Creator
Author

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.