<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reload should fail if QVD size is zero in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508784#M436493</link>
    <description>&lt;P&gt;As a second method, you can leave the LOAD logcic unchanged and add a test&lt;EM&gt; after&lt;/EM&gt; the LOAD statement has been executed. Although the overhead of loading the XML header twice is not that large, you skip at least one of them. E.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;TableSomething:
LOAD * FROM SomeFile (SomeOptions);

IF NoOfRows('TableSomething') = 0 THEN
  EXIT SCRIPT;
END IF&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Nov 2018 08:01:50 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2018-11-19T08:01:50Z</dc:date>
    <item>
      <title>Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508755#M436488</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;How to achieve this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:12:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508755#M436488</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2024-11-16T05:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508759#M436490</link>
      <description>&lt;P&gt;if QvdNoOfRecords('Qvd name')&amp;lt;=0&lt;BR /&gt;EXIT SCRIPT&lt;BR /&gt;ELSEIF store qvd into path.qvd(qvd);&lt;BR /&gt;ENDIF&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 06:58:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508759#M436490</guid>
      <dc:creator>vvvvvvizard</dc:creator>
      <dc:date>2018-11-19T06:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508772#M436492</link>
      <description>&lt;P&gt;Before loading statement, you need to put below condition to check..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;qvdNoOfRecords&lt;/SPAN&gt;&lt;SPAN&gt;('$(Path)') &amp;lt;= 0)&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;THEN&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508772#M436492</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-11-19T07:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508784#M436493</link>
      <description>&lt;P&gt;As a second method, you can leave the LOAD logcic unchanged and add a test&lt;EM&gt; after&lt;/EM&gt; the LOAD statement has been executed. Although the overhead of loading the XML header twice is not that large, you skip at least one of them. E.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;TableSomething:
LOAD * FROM SomeFile (SomeOptions);

IF NoOfRows('TableSomething') = 0 THEN
  EXIT SCRIPT;
END IF&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508784#M436493</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-11-19T08:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508794#M436495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick reply.&lt;/P&gt;&lt;P&gt;I forgot to mention 1 point, so please let me know if this code satisfies that or no.&lt;/P&gt;&lt;P&gt;Missed Point: I have 2nd QVW which runs after successful run of 1st QVW(here in 1st qvw, we are writing that above code) one.&lt;/P&gt;&lt;P&gt;So my requirement is that the 2nd QVW also should not run if the QVD size is zero along with the failure of 1st QVW.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the code which you suggested can work for my other requirement as well ?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508794#M436495</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2018-11-19T08:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508796#M436496</link>
      <description>&lt;P&gt;Thanks for your reply, same question to you as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I forgot to mention 1 point, so please let me know if this code satisfies that or no.&lt;/P&gt;&lt;P&gt;Missed Point: I have 2nd QVW which runs after successful run of 1st QVW(here in 1st qvw, we are writing that above code) one.&lt;/P&gt;&lt;P&gt;So my requirement is that the 2nd QVW also should not run if the QVD size is zero along with the failure of 1st QVW.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the code which you suggested can work for my other requirement as well ?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508796#M436496</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2018-11-19T08:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508797#M436497</link>
      <description>&lt;P&gt;If your code will exit after checking first qvd then it'll not go to script further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508797#M436497</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-11-19T08:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508802#M436498</link>
      <description>&lt;P&gt;it will not go to the further script in the SAME qvw (that means in 1st QVW)&lt;/P&gt;&lt;P&gt;But my question is, I have 2 QVWs. In QMC, there are 2 tasks created on these and there is task dependency created between them so that 2nd QVW will start run once 1st qvw runs successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the 1st QVW, I want to check QVD size is zero or not. If it is zero it should stop immediately AS WELL AS it SHOULD NOT allow 2nd QVW to run. So the 2nd QVW will run or no if I use your code and the QVD size is zero ?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:26:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508802#M436498</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2018-11-19T08:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508803#M436499</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DataFromQvd1:
Load 
  * 
from Qvw1;
//If you have publisher, use variable below in QMC
Let vNoOfRecords =NoOfRecords() ;

Store&amp;nbsp;DataFromQvd1 into DataFromQvd1.qvd (qvd);

//running second Qvw conditionally
Let NoOfQvd1Records= QvdNoOfRecords(DataFromQvd1);

If $(NoOfQvd1Records) &amp;gt;0 then
     //Run Second Qvw
     DataFromQvd2: 
     Load * from Qvw2;
     Store DataFromQvd2 into DataFromQvd2.qvd (qvd);
Else
    //Exit Script               
Endif&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508803#M436499</guid>
      <dc:creator>Joost_d</dc:creator>
      <dc:date>2018-11-19T08:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508813#M436500</link>
      <description>&lt;P&gt;I am using binary load of 1st qvw in 2nd qvw&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508813#M436500</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2018-11-19T08:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508820#M436501</link>
      <description>&lt;P&gt;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 &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://community.qlik.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;, because QlikView doesn't supply something similar. Your script then becomes&lt;/P&gt;&lt;PRE&gt;TableSomething:
LOAD * FROM SomeFile (SomeOptions);

IF NoOfRows('TableSomething') = 0 THEN
  CRASH;
END IF&lt;/PRE&gt;&lt;P&gt;Of course, the task will fail and you will get an appropriate email scream from the QDS. But the second&amp;nbsp;task will not run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508820#M436501</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-11-19T08:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508835#M436502</link>
      <description>&lt;P&gt;Crash &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nice one&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508835#M436502</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-11-19T08:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508916#M436503</link>
      <description>&lt;P&gt;Well, for one thing&lt;/P&gt;&lt;PRE&gt;:
ABORT;
:&lt;/PRE&gt;&lt;P&gt;works equally well, and is a bit less dramatic&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.qlik.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 10:56:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1508916#M436503</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-11-19T10:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509230#M436526</link>
      <description>&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 17:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509230#M436526</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2018-11-19T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509231#M436527</link>
      <description>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?&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Nov 2018 17:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509231#M436527</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2018-11-19T17:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509255#M436530</link>
      <description>Yes, it works in that manner only.&lt;BR /&gt;But in my case QVW1 was not failing, right..&lt;BR /&gt;&lt;BR /&gt;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..</description>
      <pubDate>Mon, 19 Nov 2018 18:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509255#M436530</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2018-11-19T18:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509434#M436565</link>
      <description>&lt;P&gt;Please close the thread&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 05:10:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509434#M436565</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-11-20T05:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reload should fail if QVD size is zero</title>
      <link>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509462#M436567</link>
      <description>How ?</description>
      <pubDate>Tue, 20 Nov 2018 06:38:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reload-should-fail-if-QVD-size-is-zero/m-p/1509462#M436567</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2018-11-20T06:38:04Z</dc:date>
    </item>
  </channel>
</rss>

