<?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: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221911#M15720</link>
    <description>&lt;P&gt;I forget that these are initially hidden. Here is a post which covers how to find them....&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsYtCAK" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/tHashInput-amp-tHashOutput-gone-in-5-6-1/m-p/189058&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 13:43:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-10-28T13:43:19Z</dc:date>
    <item>
      <title>how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221907#M15716</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;I don't find solution to manage this process:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;in mysql counter table 
  &lt;OL&gt; 
   &lt;LI&gt;tag the script name as "active"&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
 &lt;LI&gt;Compare two table like the SDC process&lt;/LI&gt; 
 &lt;LI&gt;if count rows &amp;gt; 0 
  &lt;OL&gt; 
   &lt;LI&gt;create a file&lt;/LI&gt; 
   &lt;LI&gt;in mysql counter table 
    &lt;OL&gt; 
     &lt;LI&gt;increment counter&lt;/LI&gt; 
     &lt;LI&gt;tag the script as "unactive"&lt;/LI&gt; 
    &lt;/OL&gt;&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
 &lt;LI&gt;if count rows = 0 
  &lt;OL&gt; 
   &lt;LI&gt;don't create the file&lt;/LI&gt; 
   &lt;LI&gt;in mysql counter table 
    &lt;OL&gt; 
     &lt;LI&gt;don't increment counter&lt;/LI&gt; 
     &lt;LI&gt;tag the script as "unactive"&lt;/LI&gt; 
    &lt;/OL&gt;&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;I join the pict of my actual job&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-center" image-alt="talend_script_process.png" style="width: 803px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7wR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138392iFEE341C0E10B2D13/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7wR.png" alt="0683p000009M7wR.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The tDBInput_3 ask if script already "active"&lt;/P&gt; 
&lt;P&gt;The tDBInput_1 subjob tag the script as "active" and put counter value in global var for the name of the file.&lt;/P&gt; 
&lt;P&gt;The tDBInput_2 subjob compare the 2 table to search for new rows.&lt;/P&gt; 
&lt;P&gt;The tDBInput_5 tag the script as"unactive" and increment the counter of 1&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221907#M15716</guid>
      <dc:creator>hcroce</dc:creator>
      <dc:date>2024-11-16T04:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221908#M15717</link>
      <description>&lt;P&gt;I'm not entirely sure I fully understand your job, but you should be able to achieve what you wish by using tHashOutput and tHashInput components and RunIf links.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Instead of writing your data to a file and to the database in your second subjob, write your data to tHashOutput components. Then create another subjob which starts with a tJava. This will be a dummy component. From this component you can use your RunIf links to test whether the number of rows requirement you have have been met. If so, you can read your data from the tHashOutput using a tHashInput component and write it to the file/db.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 12:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221908#M15717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T12:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221909#M15718</link>
      <description>&lt;P&gt;Thank you Rhall for your quick answer.&lt;/P&gt;
&lt;P&gt;I test it and tell you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 12:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221909#M15718</guid>
      <dc:creator>hcroce</dc:creator>
      <dc:date>2019-10-28T12:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221910#M15719</link>
      <description>&lt;P&gt;I don't find tHashOutput and tHashInput in talend studio 7.2...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 13:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221910#M15719</guid>
      <dc:creator>hcroce</dc:creator>
      <dc:date>2019-10-28T13:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221911#M15720</link>
      <description>&lt;P&gt;I forget that these are initially hidden. Here is a post which covers how to find them....&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsYtCAK" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/tHashInput-amp-tHashOutput-gone-in-5-6-1/m-p/189058&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 13:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221911#M15720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T13:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221912#M15721</link>
      <description>&lt;P&gt;Thank you Rhall. I got them.&lt;/P&gt; 
&lt;P&gt;But now, I don't know how to check number of rows from tHashOutput in "if" condition.&lt;/P&gt; 
&lt;P&gt;I need to learn the syntax...&lt;/P&gt; 
&lt;P&gt;I join the actual job modified with the 3 components.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="talend_script_process2.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7wD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130022i26186FFE74494775/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7wD.png" alt="0683p000009M7wD.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;Thank you very much for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 14:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221912#M15721</guid>
      <dc:creator>hcroce</dc:creator>
      <dc:date>2019-10-28T14:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221913#M15722</link>
      <description>&lt;P&gt;Ignore the job (it is just a demo job that I use for testing bits and pieces out), but take a look at the bottom left "outline" tab. Here you can access globalMap variables associated with components. Notice I have added a tHashOutput component and that this is shown in the "Outline" tab with a "number of line" variable. This is the variable you would use. You should be able to drag this to the RunIF command window&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-10-28 at 15.07.38.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7su.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133559i4EBF436569BEF25E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7su.png" alt="0683p000009M7su.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 15:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221913#M15722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T15:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows from a tMap, if count = 0, don't create empty file and don't incremente counter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221914#M15723</link>
      <description>&lt;P&gt;It works!&lt;/P&gt;
&lt;P&gt;Thank you very much Rhall!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 15:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-count-rows-from-a-tMap-if-count-0-don-t-create-empty-file/m-p/2221914#M15723</guid>
      <dc:creator>hcroce</dc:creator>
      <dc:date>2019-10-28T15:57:26Z</dc:date>
    </item>
  </channel>
</rss>

