<?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: [resolved] Measuring statistics inside a job in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287284#M60889</link>
    <description>Hi 
&lt;BR /&gt;For the first number statistic , you can use a tMysqlInput to get the number and then link it to a tJavaRow, put the value to a global variable on tJavaRow, for example: 
&lt;BR /&gt;tMysqlInput--main--tJavaRow 
&lt;BR /&gt;on tJavaRow: 
&lt;BR /&gt;globalMap.put("yourKey1", input_row.countNumber) 
&lt;BR /&gt;//countNumber is the column name defined on tMysqlInput 
&lt;BR /&gt; 
&lt;BR /&gt;For the second number statistic, read the file and link to a tJavaFlex, 
&lt;BR /&gt;in the begin part, define the two variable with int type.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  int c1=0; 
 &lt;BR /&gt;int c2=0; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;in the main part, increase the count number if the column value is not null, eg: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  if(row1. 
 &lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;LenderFlag!=null){&lt;BR /&gt;c1=c1+1;&lt;BR /&gt;}&lt;BR /&gt;if(row1.&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;CorrFlag!=null){&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;c2=c2+1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;in the end part, store the count number to global variables.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  globalMap.put("yourKey2", c1); 
 &lt;BR /&gt;globalMap.put("yourKey3", c2); 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Finally, you can call&amp;nbsp;those variables in the email. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Wed, 02 Sep 2015 03:39:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-02T03:39:33Z</dc:date>
    <item>
      <title>[resolved] Measuring statistics inside a job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287283#M60888</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;I'm creating an automated job that will process an input file, place the output in a predetermined directory, and send an email to the department that submitted the input file.&lt;BR /&gt;&lt;BR /&gt;I want the email to contain several statistics, such as:&lt;BR /&gt;[list=*]&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;the number of rows that were filtered out of the input file based upon a match in a table. I had planned to perform a count in a MySQLInput to get that number.&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;the number of non-null values in two columns (the number of non-null values in each column would be a separate statistic)&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I know this is a rather vague requests, but does anyone have any ideas of how I could capture these numbers and enter them into the automated email? I was assuming I would generate global variables that would capture those values during the job, and then I could call those variables in the email.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there a way to capture the result of the MySQL COUNT function and place it inside a global variable, or should I take a different approach to record the number of filtered rows?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Secondly, I was assuming I could use tJava or tJavaFlex with a globalMap.put to write a java code that would return the number of non-null values in two particular columns ("LenderFlag" and "CorrFlag"). I have precious little knowledge of java, so I'm not sure if such a code exists. Is there a better way to capture that number?&lt;BR /&gt;&lt;BR /&gt;Let me know if I need to provide pictures of my job or provide more information about my goals and process needs. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 11:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287283#M60888</guid>
      <dc:creator>dvorakstephen11</dc:creator>
      <dc:date>2024-11-16T11:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Measuring statistics inside a job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287284#M60889</link>
      <description>Hi 
&lt;BR /&gt;For the first number statistic , you can use a tMysqlInput to get the number and then link it to a tJavaRow, put the value to a global variable on tJavaRow, for example: 
&lt;BR /&gt;tMysqlInput--main--tJavaRow 
&lt;BR /&gt;on tJavaRow: 
&lt;BR /&gt;globalMap.put("yourKey1", input_row.countNumber) 
&lt;BR /&gt;//countNumber is the column name defined on tMysqlInput 
&lt;BR /&gt; 
&lt;BR /&gt;For the second number statistic, read the file and link to a tJavaFlex, 
&lt;BR /&gt;in the begin part, define the two variable with int type.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  int c1=0; 
 &lt;BR /&gt;int c2=0; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;in the main part, increase the count number if the column value is not null, eg: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  if(row1. 
 &lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;LenderFlag!=null){&lt;BR /&gt;c1=c1+1;&lt;BR /&gt;}&lt;BR /&gt;if(row1.&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;CorrFlag!=null){&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;c2=c2+1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;in the end part, store the count number to global variables.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  globalMap.put("yourKey2", c1); 
 &lt;BR /&gt;globalMap.put("yourKey3", c2); 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Finally, you can call&amp;nbsp;those variables in the email. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 02 Sep 2015 03:39:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287284#M60889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-02T03:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Measuring statistics inside a job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287285#M60890</link>
      <description>Hey shong, 
&lt;BR /&gt;Thanks so much! That formula is just what I need. I am, however, running into one other problem, and I wonder if you might have an obvious solution.&amp;nbsp; 
&lt;BR /&gt;Below is the code in my tJavaFlex component: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGgJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157080i56970C68EC199C22/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGgJ.png" alt="0683p000009MGgJ.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;As you can see, I'm trying to count the number of rows that have a value of "APPROVED" or "APPROVED - New Contact" in the LenderFlag column.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;Here is an image of the values in the LenderFlag column. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGY6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135030iE26EABAE4E3AA72F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGY6.png" alt="0683p000009MGY6.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Here, also, is an image of my tMap component, which shows the identification for the column I'm attempting to count upon.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGgO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142526iE298276D537A9C4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGgO.png" alt="0683p000009MGgO.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;The global variable I'm creating off of my CorrFlag count works perfectly. There are eight "CORR" values in the CorrFlag column of the file, and it returns a count of 8 in the e-mail. For some reason, my LenderFlag count returns a count of zero. 
&lt;BR /&gt; 
&lt;BR /&gt;I assumed my string was incorrect, but I double and triple checked it and I can't see how I am using an incorrect string. Is there something else I'm doing incorrectly that is causing my count to be incorrect?&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks again for your help!</description>
      <pubDate>Wed, 02 Sep 2015 15:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287285#M60890</guid>
      <dc:creator>dvorakstephen11</dc:creator>
      <dc:date>2015-09-02T15:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Measuring statistics inside a job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287286#M60891</link>
      <description>I figured out the problem with my LenderFlag count. I didn't realize that you had to use a !str.equals() syntax to match on strings, as opposed to the != that works for integers. All problems solved.</description>
      <pubDate>Fri, 04 Sep 2015 21:53:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Measuring-statistics-inside-a-job/m-p/2287286#M60891</guid>
      <dc:creator>dvorakstephen11</dc:creator>
      <dc:date>2015-09-04T21:53:19Z</dc:date>
    </item>
  </channel>
</rss>

