<?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: Netezza Result set on Message body of tSendMail in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260771#M41785</link>
    <description>Hi 
&lt;BR /&gt;You can write the result set to an excel file or a PDF file, then attach the file in the email, the job looks like: 
&lt;BR /&gt;tNetezzaInput--main--tFileOutputExcel ( or tFileOutputPDF) 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tSendMail 
&lt;BR /&gt;Note: 
&lt;A href="http://www.talendforge.org/exchange/index.php?eid=33&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1" target="_blank" rel="nofollow noopener noreferrer"&gt;tFileOutputPDF&lt;/A&gt; is custom component, shared by community users on Talend Exchange, you need to download and install it into Talend Studio before using it. 
&lt;BR /&gt;or write the result set in the body message of tSendMail, the job as seen below: 
&lt;BR /&gt;tNetezzaInput--main(row1)--tJavaFlex 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tSendMail 
&lt;BR /&gt;in the begin part of tJavaFlex, define a string, eg: 
&lt;BR /&gt;String result_set=""; 
&lt;BR /&gt;in the main part of tJavaFlex, 
&lt;BR /&gt;result_set=result_set+row1.column1+row1.column2+"\n"; 
&lt;BR /&gt;note: if you have more columns, append all the columns you want to send in the email. 
&lt;BR /&gt;in the end part of tJavaFlex, put the result_set to a global variable, eg: 
&lt;BR /&gt;globalMap.put("result",result_set); 
&lt;BR /&gt; 
&lt;BR /&gt;in the body of tSendMail, write the body message as below, for example: 
&lt;BR /&gt;"Hello, this is the result set queried from Netezza table, see below: "+"\n"+(String)globalMap.get("result") 
&lt;BR /&gt; 
&lt;BR /&gt;Shong</description>
    <pubDate>Fri, 07 Dec 2012 06:09:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-12-07T06:09:29Z</dc:date>
    <item>
      <title>Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260770#M41784</link>
      <description>Hi Team- 
&lt;BR /&gt;I have to send my Audit info through email. Information is stored in Netezza table. How can I use result set of quey like select * from Table_name; in my message body. 
&lt;BR /&gt;Is this done by tFlowiterate, if so what would be the syntax for that? 
&lt;BR /&gt;I tried another option to write in excel file and attached in the mail. but can we modify excel font or write in PDF. 
&lt;BR /&gt;Hope a favorable and early response. 
&lt;BR /&gt;Regrads, 
&lt;BR /&gt;Siegfried</description>
      <pubDate>Thu, 06 Dec 2012 04:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260770#M41784</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-12-06T04:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260771#M41785</link>
      <description>Hi 
&lt;BR /&gt;You can write the result set to an excel file or a PDF file, then attach the file in the email, the job looks like: 
&lt;BR /&gt;tNetezzaInput--main--tFileOutputExcel ( or tFileOutputPDF) 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tSendMail 
&lt;BR /&gt;Note: 
&lt;A href="http://www.talendforge.org/exchange/index.php?eid=33&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1" target="_blank" rel="nofollow noopener noreferrer"&gt;tFileOutputPDF&lt;/A&gt; is custom component, shared by community users on Talend Exchange, you need to download and install it into Talend Studio before using it. 
&lt;BR /&gt;or write the result set in the body message of tSendMail, the job as seen below: 
&lt;BR /&gt;tNetezzaInput--main(row1)--tJavaFlex 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tSendMail 
&lt;BR /&gt;in the begin part of tJavaFlex, define a string, eg: 
&lt;BR /&gt;String result_set=""; 
&lt;BR /&gt;in the main part of tJavaFlex, 
&lt;BR /&gt;result_set=result_set+row1.column1+row1.column2+"\n"; 
&lt;BR /&gt;note: if you have more columns, append all the columns you want to send in the email. 
&lt;BR /&gt;in the end part of tJavaFlex, put the result_set to a global variable, eg: 
&lt;BR /&gt;globalMap.put("result",result_set); 
&lt;BR /&gt; 
&lt;BR /&gt;in the body of tSendMail, write the body message as below, for example: 
&lt;BR /&gt;"Hello, this is the result set queried from Netezza table, see below: "+"\n"+(String)globalMap.get("result") 
&lt;BR /&gt; 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 07 Dec 2012 06:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260771#M41785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-07T06:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260772#M41786</link>
      <description>I'm new to Talend but am also having a slow day which isn't helping... 
&lt;BR /&gt;I've set this up with a query against my oracle DB using tOracleInput, I've connected that to a tJavaFlex and added the code as you described but get the error "row1 cannot be resolved to a variable" - I've attached a screen show of the job and settings. 
&lt;BR /&gt;My query in the tOracleInput component is 
&lt;BR /&gt; 
&lt;I&gt; select trunc(day_id)day_id, sum(trans_count)count&lt;BR /&gt; from xxxxx&lt;BR /&gt; where day_id &amp;gt; sysdate-5&lt;BR /&gt; group by trunc(day_id) &lt;/I&gt; 
&lt;BR /&gt;so I would have expected that I'd need to change row1.column1 to reflect my data but I can't seem to crack the correct combination for this - please can you advise....</description>
      <pubDate>Wed, 08 May 2013 15:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260772#M41786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-08T15:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260773#M41787</link>
      <description>you will need to use the Talend schema names-- not the database names. if you click the "Edit schema ..." button in the tJavaFlex, you should see the current talend schema columns for that component-- your reference to "row1.columnName" will need to match one of those exactly.</description>
      <pubDate>Wed, 08 May 2013 21:01:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260773#M41787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-08T21:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260774#M41788</link>
      <description>Thanks for your reply JohnGarrettMartin - Your right in that i hadn't bought the columns through in the schema, I've done that now but I still can't get it and its really frustrating me as I know it must be straightforward. 
&lt;BR /&gt;My columns are day_id and count - as far as i can see the schema name is the same as this (I've attached a screenshot in case that helps) - so what would the syntax look like in the 'Main code' box? I've tried the following 
&lt;BR /&gt; result_set=result_set+row1.columnName+row1.columnName+"\n"; 
&lt;BR /&gt; result_set=result_set+row1.day_id+row1.count+"\n"; 
&lt;BR /&gt; result_set=result_set+day_id+count+"\n"; 
&lt;BR /&gt;The error is that the field cannot be resolved into a variable. Thanks!</description>
      <pubDate>Thu, 09 May 2013 09:15:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260774#M41788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-09T09:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260775#M41789</link>
      <description>getting closer 
&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;BR /&gt;make sure that the row connected to the tJavaFlex is named "row1" you will need to use whatever it is named exactly. 
&lt;BR /&gt;another potential issue is that you might not have declared the "result_set" variable-- I might suggest you create a context variable for this as you can then re-use it outside the scope of the tJavaFlex-- like in the tSendMail 
&lt;BR /&gt;then you would just use: 
&lt;BR /&gt;context.result_set += row1.day_id+row1.count+"\n" 
&lt;BR /&gt;edit: 
&lt;BR /&gt;If you are not aware of the "Code" tab (at the bottom of the canvas)-- clicking it will generate the code and show it to you-- it will highlight problems in red along the scroll bar-- this can help zero in on any syntax problems you may have.</description>
      <pubDate>Thu, 09 May 2013 13:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260775#M41789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-09T13:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Netezza Result set on Message body of tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260776#M41790</link>
      <description>Thanks John that's working now. A combination of having the correct row identifier (e.g. row2) and the case of the column names.
&lt;BR /&gt;appreciate all your help
&lt;BR /&gt;Malcolm.</description>
      <pubDate>Thu, 09 May 2013 16:12:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Netezza-Result-set-on-Message-body-of-tSendMail/m-p/2260776#M41790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-09T16:12:35Z</dc:date>
    </item>
  </channel>
</rss>

