Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mohan2391
Creator II
Creator II

Reload should fail if QVD size is zero

Hi,

 

I have a requirement where the reload of QVW should stop when the size of QVD which I am loading in the QVW is zero.

How to achieve this ?

 

Thanks in advance

 

17 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If you want a task furter up in the QMC chain to not run when a QVD is found to be empty, let your script crash if you detect no loaded rows. I often use a self-invented statement called CRASH; to do this Smiley Wink, because QlikView doesn't supply something similar. Your script then becomes

TableSomething:
LOAD * FROM SomeFile (SomeOptions);

IF NoOfRows('TableSomething') = 0 THEN
  CRASH;
END IF

Of course, the task will fail and you will get an appropriate email scream from the QDS. But the second task will not run.

 

shiveshsingh
Master
Master

Crash 😛

 

Nice one

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Well, for one thing

:
ABORT;
:

works equally well, and is a bit less dramatic Smiley Happy

qlikwiz123
Creator III
Creator III

If two QVW reloads are dependent, then QVW2 runs after 'Successful' execution of QVW1 in QMC. If QVW1 fails, then QVW2 would never reload at all. Isn't this the case in your tasks set in QMC?

qlikwiz123
Creator III
Creator III

If two QVW reloads are dependent, then QVW2 runs after 'Successful' execution of QVW1 in QMC. If QVW1 fails, then QVW2 would never reload at all. Isn't this the case in your tasks set in QMC?
mohan2391
Creator II
Creator II
Author

Yes, it works in that manner only.
But in my case QVW1 was not failing, right..

So I have made that answer as correct.. That script looks for size of the qvd 1st, if it is zero it will fail because of writing CRASH/ABORT.. if it is not zero, normal execution will happen..
shiveshsingh
Master
Master

Please close the thread

mohan2391
Creator II
Creator II
Author

How ?