<?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: Nested Mysql Query Email. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Nested-Mysql-Query-Email/m-p/2235178#M24284</link>
    <description>Hi 
&lt;BR /&gt;Approach 1 is the best way, select all the categories from the first table, and then iterate each category for the next processing, the current category will be the parameter in other query. 
&lt;BR /&gt;eg: 
&lt;BR /&gt;tMysqlInput1--main(row1)--tFlowToIterate--iterate--tMysqlInput2--main--&amp;gt;babababa 
&lt;BR /&gt; 
&lt;BR /&gt;on tMysqlInput, write the query as 
&lt;BR /&gt;"select item_name, time from tableName where category='"+(String)globalMap.get("row1.category")+"'" 
&lt;BR /&gt; 
&lt;BR /&gt;//from this example, you can see that accessing the current category is to use the expression. 
&lt;BR /&gt;(String)globalMap.get("row1.category") 
&lt;BR /&gt; 
&lt;BR /&gt;Hope it helps you. 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Tue, 05 Nov 2019 05:50:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-05T05:50:58Z</dc:date>
    <item>
      <title>Nested Mysql Query Email.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Nested-Mysql-Query-Email/m-p/2235177#M24283</link>
      <description>&lt;P&gt;I am successfully able to fetch data from mysql using tmysqlrow and have it emailed after doing some data manipulation using tjavarow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I wish select all the categories and subcategories from the first table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then generate an email category wise. This is what I would want the three emails to look like.&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-inline" image-alt="emails.PNG" style="width: 573px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M82W.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136601i974475A06EED7651/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M82W.png" alt="0683p000009M82W.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;i can think of two approaches&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Approach 1: I run a select query on each on the first table and fetch all the categories and subcategories and then for each of the subcategories, i go to the second table, select all the columns i need and then send out the email for each category.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Approach 2: I use a join select statement, fetch everything and then email everything category wise, is this possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;help please.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 18:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Nested-Mysql-Query-Email/m-p/2235177#M24283</guid>
      <dc:creator>adbawany</dc:creator>
      <dc:date>2019-11-02T18:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Mysql Query Email.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Nested-Mysql-Query-Email/m-p/2235178#M24284</link>
      <description>Hi 
&lt;BR /&gt;Approach 1 is the best way, select all the categories from the first table, and then iterate each category for the next processing, the current category will be the parameter in other query. 
&lt;BR /&gt;eg: 
&lt;BR /&gt;tMysqlInput1--main(row1)--tFlowToIterate--iterate--tMysqlInput2--main--&amp;gt;babababa 
&lt;BR /&gt; 
&lt;BR /&gt;on tMysqlInput, write the query as 
&lt;BR /&gt;"select item_name, time from tableName where category='"+(String)globalMap.get("row1.category")+"'" 
&lt;BR /&gt; 
&lt;BR /&gt;//from this example, you can see that accessing the current category is to use the expression. 
&lt;BR /&gt;(String)globalMap.get("row1.category") 
&lt;BR /&gt; 
&lt;BR /&gt;Hope it helps you. 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 05 Nov 2019 05:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Nested-Mysql-Query-Email/m-p/2235178#M24284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T05:50:58Z</dc:date>
    </item>
  </channel>
</rss>

