<?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 Adding each row of a table to collection(HashMap) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237562#M25952</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to parallel execute the same child job with the values read from a table.&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using tSetGlobalVar I have set 2 global HashMap varaibles - say sharedMap1 and sharedMap2 in tPrejob step.&lt;/P&gt;&lt;P&gt;In sub-task, I am reading the table - fromId, toID and many other fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to save each row values&amp;nbsp;to the collection - 1st record to sharedMap1, 2nd record to sharedMap2.&lt;/P&gt;&lt;P&gt;How can I achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then using tParallelize I can call both the tRunJob with the HashMap variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Nov 2018 16:09:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-10T16:09:29Z</dc:date>
    <item>
      <title>Adding each row of a table to collection(HashMap)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237562#M25952</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to parallel execute the same child job with the values read from a table.&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using tSetGlobalVar I have set 2 global HashMap varaibles - say sharedMap1 and sharedMap2 in tPrejob step.&lt;/P&gt;&lt;P&gt;In sub-task, I am reading the table - fromId, toID and many other fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to save each row values&amp;nbsp;to the collection - 1st record to sharedMap1, 2nd record to sharedMap2.&lt;/P&gt;&lt;P&gt;How can I achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then using tParallelize I can call both the tRunJob with the HashMap variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Nov 2018 16:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237562#M25952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-10T16:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding each row of a table to collection(HashMap)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237563#M25953</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Could you please provide the sample job flow screenshots with some sample input datasets you are trying to process and output datasets you are trying to achieve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
      <pubDate>Sat, 10 Nov 2018 16:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237563#M25953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-10T16:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding each row of a table to collection(HashMap)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237564#M25954</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find in the attachment.&lt;/P&gt;&lt;P&gt;For testing I have created a sqlite table called TEST with single column - ID as int.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lu78"&gt;job_test_tParallel.zip&lt;/A&gt;</description>
      <pubDate>Sat, 10 Nov 2018 17:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237564#M25954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-10T17:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding each row of a table to collection(HashMap)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237565#M25955</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its working now.&lt;/P&gt;
&lt;P&gt;tDBInput ----&amp;gt;(row1 Main) tJavaFlex&lt;/P&gt;
&lt;P&gt;|&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| (OnSubjobOk)&lt;/P&gt;
&lt;P&gt;tJava_2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tJavaFlex:&lt;/P&gt;
&lt;P&gt;start code:&lt;/P&gt;
&lt;P&gt;java.util.List&amp;lt;java.util.Map&amp;lt;String, String&amp;gt;&amp;gt; sharedList=new java.util.ArrayList&amp;lt;java.util.Map&amp;lt;String, String&amp;gt;&amp;gt;();&lt;/P&gt;
&lt;P&gt;Main code:&lt;/P&gt;
&lt;P&gt;sharedList.add(new java.util.HashMap(){{&lt;BR /&gt;put("ID",row1.ID);&lt;/P&gt;
&lt;P&gt;}}&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;End code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;globalMap.put("sharedList",sharedList);&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tJava_2:&lt;/P&gt;
&lt;P&gt;System.out.println(((java.util.ArrayList)globalMap.get("sharedList")).size());&lt;/P&gt;
&lt;P&gt;System.out.println(((java.util.HashMap)((java.util.ArrayList)globalMap.get("sharedList")).get(0)).get("ID"));&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 10:48:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-each-row-of-a-table-to-collection-HashMap/m-p/2237565#M25955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-11T10:48:31Z</dc:date>
    </item>
  </channel>
</rss>

