<?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] Iterating over a ArrayList&amp;lt;HashMap&amp;gt; to produce multiple output rows in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355344#M121114</link>
    <description>Pl check if this helps..., application area is different, but they have used HashMap in the way you are looking for...
&lt;BR /&gt;
&lt;A href="http://spring-webservice-2-step-by-step.blogspot.in/2014/01/talend-elasticsearch-indexing-tutorial.html" rel="nofollow noopener noreferrer"&gt;http://spring-webservice-2-step-by-step.blogspot.in/2014/01/talend-elasticsearch-indexing-tutorial.html&lt;/A&gt;
&lt;BR /&gt;Vaibhav</description>
    <pubDate>Tue, 27 May 2014 12:15:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-05-27T12:15:39Z</dc:date>
    <item>
      <title>[resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355341#M121111</link>
      <description>Hi I need to iterate over my ArrayList&amp;lt;HashMap&amp;lt;String, String&amp;gt;&amp;gt; and produce multiple output rows
&lt;BR /&gt;I Stuck the below in a tJavaRow but have got to a dead end as obviously on the last vlaues extracted from the HashMap are outputted in a single row.
&lt;BR /&gt;"ArrayList&amp;lt;HashMap&amp;gt; profiled_attributes =(ArrayList&amp;lt;HashMap&amp;gt;)input_row.profiled_attributes;
&lt;BR /&gt;for (HashMap&amp;lt;String, String&amp;gt; attribute : profiled_attributes){
&lt;BR /&gt;output_row.name = attribute.get("name");
&lt;BR /&gt;output_row.text_value = attribute.get("text_value");
&lt;BR /&gt;output_row.source = attribute.get("source");
&lt;BR /&gt;}"
&lt;BR /&gt;
&lt;BR /&gt;Is there anyway to make the tJava.... components output multiple rows?
&lt;BR /&gt;I also took a brief look at tLoop and tForeach but these don't support ArrayLists is there a way I could use these?
&lt;BR /&gt;Or I'm I over complicating this and is there a much simpler option?
&lt;BR /&gt;Cheers Andy</description>
      <pubDate>Mon, 26 May 2014 17:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355341#M121111</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-26T17:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355342#M121112</link>
      <description>Hi Andy,&lt;BR /&gt;Can you try using &lt;BR /&gt;if (HashMap is not null)&lt;BR /&gt;{&lt;BR /&gt;your code &lt;BR /&gt;here&lt;BR /&gt;}&lt;BR /&gt;Vaibhav</description>
      <pubDate>Tue, 27 May 2014 05:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355342#M121112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-27T05:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355343#M121113</link>
      <description>Vaibhav, 
&lt;BR /&gt;Thanks for the replay, however I'm not entirely sure I understand your recommendation as the is no issue with null HashMaps. 
&lt;BR /&gt;I've attached some images to illustrate. 
&lt;BR /&gt;Basically attribute_array rows contain the column profiled_attributes which is an ArrayList&amp;lt;HashMap&amp;lt;String, String&amp;gt;&amp;gt;, right now this is test data and contains 2 attributes i.e; 
&lt;BR /&gt;ArrayListHashMap("name"="Subscribed to","text_value"="Publication E","source"="Source 35" ); 
&lt;BR /&gt;ArrayListHashMap("name=Lives In","text_value"="A Town","source"="Source 47"); 
&lt;BR /&gt;I need the tJavaRow (or any other component) to iterate over this array and output a row per Array entry. 
&lt;BR /&gt;In my current example 1256 single_attribute rows need to be gendered for the 628 attribute arrays passed in. 
&lt;BR /&gt;Hope this explains what I need. 
&lt;BR /&gt;P.S. I have thought about generating a row per profiled_attribute, wrapping them up in an object seamed like a good idea and i'm sure there must be a way to do it. 
&lt;BR /&gt;Cheers Andy 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEEs.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155891i4000D4FD47BFB1AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEEs.png" alt="0683p000009MEEs.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDzn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147002i3D98DB0B31C36387/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDzn.png" alt="0683p000009MDzn.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEBF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134496i5BDEE0AACD628A4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEBF.png" alt="0683p000009MEBF.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 27 May 2014 09:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355343#M121113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-27T09:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355344#M121114</link>
      <description>Pl check if this helps..., application area is different, but they have used HashMap in the way you are looking for...
&lt;BR /&gt;
&lt;A href="http://spring-webservice-2-step-by-step.blogspot.in/2014/01/talend-elasticsearch-indexing-tutorial.html" rel="nofollow noopener noreferrer"&gt;http://spring-webservice-2-step-by-step.blogspot.in/2014/01/talend-elasticsearch-indexing-tutorial.html&lt;/A&gt;
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Tue, 27 May 2014 12:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355344#M121114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-27T12:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355345#M121115</link>
      <description>Thanks for that was kind of going this way anyway.&lt;BR /&gt;Now using a JSON String instead of a HashMap this can be feed to tExtractJSONFields and outputted as the rows I need.&lt;BR /&gt;I'll put up some screens later as an example.&lt;BR /&gt;P.S. That &lt;A href="http://www.talendforge.org/exchange/index.php?eid=1089&amp;amp;product=tos&amp;amp;action=view" target="_blank" rel="nofollow noopener noreferrer"&gt;Mustache&lt;/A&gt; component looks really good (though I've already done the JSON encoding using base Java)&lt;BR /&gt;Cheers Andy</description>
      <pubDate>Tue, 27 May 2014 14:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355345#M121115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-27T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355346#M121116</link>
      <description>Solved but I feel there should be a better way i.e. the ability to loop/iterate something and produce multiple output rows, core components do it so im sure it possible... 
&lt;BR /&gt;Basically generate a JSON string (or any other flat format that can later be turned into rows ); 
&lt;BR /&gt;Pass this thought to were you need to loop/iterate and then extract your rows. 
&lt;BR /&gt;Cheers Andy 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009ME4U.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147923iC36595CBEFDCEB55/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009ME4U.png" alt="0683p000009ME4U.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEHW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145853i85A88E6EB98B1F65/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEHW.png" alt="0683p000009MEHW.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEHb.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145214i72EC74ECDDB5CE92/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEHb.png" alt="0683p000009MEHb.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 27 May 2014 14:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355346#M121116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-27T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Iterating over a ArrayList&lt;HashMap&gt; to produce multiple output rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355347#M121117</link>
      <description>Hay... &lt;BR /&gt;Good that you have achieved the objective in the different approach and it was useful to you. Also thanks for providing the screenshot of solution.&lt;BR /&gt;You may get an idea after looking at different scenario which could be implemented using different approach.&lt;BR /&gt;Vaibhav</description>
      <pubDate>Wed, 28 May 2014 05:24:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Iterating-over-a-ArrayList-lt-HashMap-gt-to-produce/m-p/2355347#M121117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-28T05:24:57Z</dc:date>
    </item>
  </channel>
</rss>

