<?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: send row count though mail in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/send-row-count-though-mail/m-p/2357137#M122509</link>
    <description>&lt;PRE&gt;select count(*) from emp where flag='m';&lt;/PRE&gt;
&lt;BR /&gt;You can use tOracleInput to execute a select statement and store the result to context variable for used later, eg:
&lt;BR /&gt;tOracleInput--main--tJavaRow
&lt;BR /&gt;on tOracleInput: define a column called 'nb_emp_m' with int type, set the query as "
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;select count(*) from emp where flag='m'&lt;/FONT&gt;&lt;/FONT&gt;"
&lt;BR /&gt;on tJavaRow:
&lt;BR /&gt;context.nb_emp_m=input_row.nb_emp_m.
&lt;BR /&gt;//the same process for other counts.
&lt;BR /&gt;In the end of job, use a tSendMail to send an email, the message is defined as below for example:
&lt;BR /&gt;"
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;Source file name: emp&lt;/FONT&gt;&lt;/FONT&gt;"+"\n"+"
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;Matched count:&lt;/FONT&gt;&lt;/FONT&gt;"+context.nb_emp_m+"\n"+"
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;Unmatched count:&lt;/FONT&gt;&lt;/FONT&gt;"+(other string...)
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
    <pubDate>Tue, 18 Oct 2016 17:09:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-18T17:09:07Z</dc:date>
    <item>
      <title>send row count though mail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/send-row-count-though-mail/m-p/2357136#M122508</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;I have need help, i have two target table. for example: EMP, DEPT.&lt;BR /&gt;tinputexcel1--&amp;gt;tmap---&amp;gt;toracleoutput(EMP).&lt;BR /&gt;tinputexcel2--&amp;gt;tmap---&amp;gt;toracleoutput(DEPT).&amp;nbsp;&lt;BR /&gt;i need to send mail, count of both table with filter condition.&lt;BR /&gt;select count(*) from emp where flag='m';&lt;BR /&gt;select count(*) from emp where flag='U';&lt;BR /&gt;select count(*) from dept where flag='m';&lt;BR /&gt;select count(*) from dept where flag='U';&lt;BR /&gt;---- email BODY:--------------&lt;BR /&gt;Source file name: emp&lt;BR /&gt;Matched count: 4&lt;BR /&gt;Unmatched count:2&lt;BR /&gt;Total records:6&lt;BR /&gt;Source file name: DEPT&lt;BR /&gt;Matched count: 6&lt;BR /&gt;Unmatched count:2&lt;BR /&gt;Total records:8&lt;BR /&gt;using context variable or any option.&lt;BR /&gt;Kindly help me this scenario. i am new to this ETL.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;shridhar&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 09:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/send-row-count-though-mail/m-p/2357136#M122508</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-10T09:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: send row count though mail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/send-row-count-though-mail/m-p/2357137#M122509</link>
      <description>&lt;PRE&gt;select count(*) from emp where flag='m';&lt;/PRE&gt;
&lt;BR /&gt;You can use tOracleInput to execute a select statement and store the result to context variable for used later, eg:
&lt;BR /&gt;tOracleInput--main--tJavaRow
&lt;BR /&gt;on tOracleInput: define a column called 'nb_emp_m' with int type, set the query as "
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;select count(*) from emp where flag='m'&lt;/FONT&gt;&lt;/FONT&gt;"
&lt;BR /&gt;on tJavaRow:
&lt;BR /&gt;context.nb_emp_m=input_row.nb_emp_m.
&lt;BR /&gt;//the same process for other counts.
&lt;BR /&gt;In the end of job, use a tSendMail to send an email, the message is defined as below for example:
&lt;BR /&gt;"
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;Source file name: emp&lt;/FONT&gt;&lt;/FONT&gt;"+"\n"+"
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;Matched count:&lt;/FONT&gt;&lt;/FONT&gt;"+context.nb_emp_m+"\n"+"
&lt;FONT size="2"&gt;&lt;FONT face="Verdana," helvetica=""&gt;Unmatched count:&lt;/FONT&gt;&lt;/FONT&gt;"+(other string...)
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 18 Oct 2016 17:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/send-row-count-though-mail/m-p/2357137#M122509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-18T17:09:07Z</dc:date>
    </item>
  </channel>
</rss>

