<?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: Don't truncate output DB table if input row count is zero in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331289#M100284</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, Thanks. this is what I was looking for. But its giving an error :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="run-if2.PNG" style="width: 647px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwaM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131248i6D701823EE775BFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwaM.png" alt="0683p000009LwaM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2017 10:39:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-05T10:39:05Z</dc:date>
    <item>
      <title>Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331287#M100282</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have simple job to load data as it is from .csv file to MS SQLServer table :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="loadinvent.PNG" style="width: 820px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwaC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133754iA05D39E5576C9E29/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwaC.png" alt="0683p000009LwaC.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;There is a chance that the tFileInputDelimited component would not get the file at specified path. So in this case, input row count becomes 0 and truncating output table is totally ineffiecient.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there any way to define a check like if input row count &amp;gt; 0 then only contrl should passed on to output table.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Pseudo code of requirement :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;if count(NorthInventory_Rows &amp;gt; 0) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;truncate the table raw_inventory_north and load data
} else {
&amp;nbsp; &amp;nbsp; &amp;nbsp; don't truncate the table raw_inventory_north  &lt;BR /&gt;}&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331287#M100282</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331288#M100283</link>
      <description>&lt;P&gt;Use a tFileExist component to test for the existence of the file. Then use Run If triggers to choose your path based on that.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 09:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331288#M100283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-05T09:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331289#M100284</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, Thanks. this is what I was looking for. But its giving an error :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="run-if2.PNG" style="width: 647px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwaM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131248i6D701823EE775BFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwaM.png" alt="0683p000009LwaM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 10:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331289#M100284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-05T10:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331290#M100285</link>
      <description>&lt;P&gt;Can you show your RunIf config? It looks like you may&amp;nbsp;have an issue there. Alternatively can you show us line 1408 of your code for this job? Just go to the code tab and you will see where the error is from a red line on the right hand side.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 10:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331290#M100285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-05T10:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331291#M100286</link>
      <description>&lt;P&gt;There is nothing as condition in if statement :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="run-if-error.PNG" style="width: 874px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwZV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141347iD29B06389F2AADC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwZV.png" alt="0683p000009LwZV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Nothing specified in condition as well :&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="condition.PNG" style="width: 840px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwC7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157428iA9B684CB0A0D859B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwC7.png" alt="0683p000009LwC7.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;What do I need to specify as condtion ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I tried Global Variable 'EXISTS' as mentioned &lt;A title="tFileExist" href="https://help.talend.com/reader/sXnOEue5WhFRgaIV1tHKhw/tDu3Uh3e~8OgwBDYsMmdGg" target="_blank" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;, but no luck.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331291#M100286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-05T11:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331292#M100287</link>
      <description>&lt;P&gt;Ah, that will be why. You need a condition in here. Just use this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;((Boolean)globalMap.get("tFileExist_1_EXISTS"))&lt;/PRE&gt;&lt;P&gt;The above will give you a boolean representing whether the file exists or not&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:07:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331292#M100287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-05T11:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331293#M100288</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt; wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Ah, that will be why. You need a condition in here. Just use this....&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;PRE&gt;((Boolean)globalMap.get("tFileExist_1_EXISTS"))&lt;/PRE&gt; 
 &lt;P&gt;The above will give you a boolean representing whether the file exists or not&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;This get it on to work. Many thanks for your time&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 11:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331293#M100288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-05T11:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331294#M100289</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I check the same in below case :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anothercase.PNG" style="width: 751px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwNe.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138804iC5CB0AD48F9F943F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwNe.png" alt="0683p000009LwNe.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So, if the output of tFlowMeter = &lt;STRONG&gt;O rows&lt;/STRONG&gt;, prevent truncating the output MS SQL&amp;nbsp;table.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 07:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331294#M100289</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-06T07:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Don't truncate output DB table if input row count is zero</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331295#M100290</link>
      <description>&lt;P&gt;You could forget the FlowMeter and simply load the data to a tHashOutput. Use the component statistics (look in the bottom left corner of the Studio, you can expand the component name and drag out statistic values from there) to decide whether more than 0 rows have been loaded to the tHashOutput. If that is the case, load the data from a corresponding tHashInput to your DB component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code for checking whether more than 0 rows have been written to your tHashOutput will look something like this....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;((Integer)globalMap.get("tHashOutput_1_NB_LINE"))&amp;gt;0&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Sep 2017 09:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Don-t-truncate-output-DB-table-if-input-row-count-is-zero/m-p/2331295#M100290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-06T09:09:53Z</dc:date>
    </item>
  </channel>
</rss>

