<?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 when there are no rows in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-when-there-are-no-rows/m-p/2238754#M26767</link>
    <description>&lt;P&gt;Many components have built in global variables. One of them that is common to a lot if them is row count or # of lines processed. You would typically retrieve this after that subjob is completed.&lt;/P&gt;
&lt;P&gt;For example, tFixedFlowInput's is&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;((Integer)globalMap.get("tFixedFlowInput_2_NB_LINE"))&lt;/PRE&gt;
&lt;P&gt;for something like tMSSqlInput you would use&lt;/P&gt;
&lt;PRE&gt;((Integer)globalMap.get("tMSSqlInput_1_NB_LINE"))&lt;/PRE&gt;
&lt;P&gt;This will also report if there are 0 rows.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Oct 2018 16:51:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-03T16:51:01Z</dc:date>
    <item>
      <title>How to count rows when there are no rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-when-there-are-no-rows/m-p/2238753#M26766</link>
      <description>&lt;P&gt;I want to count the number of rows, but in the case that there are no rows, I want to get a result saying zero, not nothing at all.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried tFixedFlowInput -&amp;gt; tUnite -&amp;gt; tAggregateRow, and&amp;nbsp;selecting "Ignore null values", but my&amp;nbsp;row structure just contains a&amp;nbsp;string (that I am grouping by) and an int, and you can't set an int to null.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I could add a dummy column, but that's a bit messy, I don't want to add any more components than I need.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I could just subtract 1 from the count, but that's an extra tJavaRow or tMap, and will lead to confusion.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If I want to do something more complex as well, like&amp;nbsp;calculate a standard deviation, then the dummy row with a zero integer value will throw the statistics out.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I could tUnite a dummy row after the tAggregateRow and aggregate that&amp;nbsp;in, but that's extra processing and an extra component and confusion.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there a "good" way to do this?&amp;nbsp;There are plenty of messy ways.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 15:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-when-there-are-no-rows/m-p/2238753#M26766</guid>
      <dc:creator>PhilHibbs</dc:creator>
      <dc:date>2018-10-03T15:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows when there are no rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-when-there-are-no-rows/m-p/2238754#M26767</link>
      <description>&lt;P&gt;Many components have built in global variables. One of them that is common to a lot if them is row count or # of lines processed. You would typically retrieve this after that subjob is completed.&lt;/P&gt;
&lt;P&gt;For example, tFixedFlowInput's is&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;((Integer)globalMap.get("tFixedFlowInput_2_NB_LINE"))&lt;/PRE&gt;
&lt;P&gt;for something like tMSSqlInput you would use&lt;/P&gt;
&lt;PRE&gt;((Integer)globalMap.get("tMSSqlInput_1_NB_LINE"))&lt;/PRE&gt;
&lt;P&gt;This will also report if there are 0 rows.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 16:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-when-there-are-no-rows/m-p/2238754#M26767</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-03T16:51:01Z</dc:date>
    </item>
  </channel>
</rss>

