Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to delay script load until data file has been updated.

I am looking for a way to make my script check the data it's trying to load and make sure it has been updated within the last 12 hours or so before continuing.  Else I want it to loop and sleep for 10 seconds and then check again until the update has completed.  I don't care if it loops indefinitely if the file doesn't update.  I will manually stop the looping when I get to work in the morning and check into things if the update doesn't happen.

This is the text I have below.

Directory \\Busintel\qlikview\Source_Data\;

do until (NOW()-Filetime(FCDATAQT.TXT))<.6

Test:

First 5

LOAD @2,

   NOW()-Filetime() as TestTime

FROM

\\Busintel\qlikview\Source_Data\FCDATAQT.TXT

(txt, codepage is 1252, no labels, delimiter is ';', msq)

Where (NOW()-Filetime())<.6;

Sleep(10000);

loop

When I comment the looping structure, the field TestTime = roughly .12 at the moment.  The loop continues indefinitely however.  What can I do to end the loop if TestTime is less than .6?  If I can make that happen, it would solve a great deal of issues for me and free up a lot of my time for more productive tasks.


Thanks,

Scott

0 Replies