<?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] retrieve globalMap to row in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210793#M9083</link>
    <description>John, &lt;BR /&gt;I'm missing something...if I put something like &lt;BR /&gt;&lt;PRE&gt;for (int i = 0; i &amp;lt; 5; i ++) {&lt;BR /&gt;row15.dc1 = i;&lt;BR /&gt;row15.dc2 = i+1;&lt;BR /&gt;}&lt;/PRE&gt;&lt;BR /&gt;in the MAIN for tjavaflex, it only outputs 1 row. (the last one of the iteration actually)</description>
    <pubDate>Wed, 18 May 2011 12:24:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-05-18T12:24:11Z</dc:date>
    <item>
      <title>[resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210788#M9078</link>
      <description>Hi,&lt;BR /&gt;row1 ---(main) ---&amp;gt; tjavaflex ---&amp;gt; tMySQLOutput&lt;BR /&gt;tJavaFlex main, I insert rows to a global HashSet.&lt;BR /&gt;tJavaFlex end, I export the HashSet &lt;BR /&gt;&lt;PRE&gt;globalMap.put("specialPairs", specialPairs);&lt;/PRE&gt;&lt;BR /&gt;How can I use the content of the globalMap as row input in the next component, such as tjavarow or tMysqlOutput ?&lt;BR /&gt;PS.&lt;BR /&gt;I am able to iterate and System.out.println() the content of the globalMap in a tjava with&lt;BR /&gt;&lt;PRE&gt;HashSet unique = (HashSet)globalMap.get("specialPairs");&lt;/PRE&gt;&lt;BR /&gt;but it's just console output which I can't use in any other components.</description>
      <pubDate>Sat, 16 Nov 2024 12:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210788#M9078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210789#M9079</link>
      <description>In code, a subjob is a set of nested loops. Each component consists of BEGIN, MAIN, and END code. When components are connected within a subjob, these code sections are composed in the following manner:&lt;BR /&gt;input--row--&amp;gt;tJavaFlex--row--&amp;gt;Output&lt;BR /&gt;Output_1 START {&lt;BR /&gt; tJavaFlex_1 START {&lt;BR /&gt;  Input_1 START {&lt;BR /&gt;   Input_1 MAIN { }&lt;BR /&gt;   tJavaFlex_1 MAIN { }&lt;BR /&gt;   Output_1 MAIN { }&lt;BR /&gt;  } Input_1 END &lt;BR /&gt; } tJavaFlex_1 END&lt;BR /&gt;} Output_1 END&lt;BR /&gt;&lt;BR /&gt;so to insert data into rows with a tJavaFlex, you must do it in the MAIN section of the code.</description>
      <pubDate>Tue, 17 May 2011 19:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210789#M9079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-17T19:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210790#M9080</link>
      <description>Thanks John, 
&lt;BR /&gt;the problem I have with just forwarding the rows from MAIN part is that I add each row to a unique HashSet to discard duplicates (based on a custom hashCode() and equals() method of my java object). 
&lt;BR /&gt;Thus, I have to finish adding all rows to the global map before I can iterate over them again. 
&lt;BR /&gt;One workaround I found was, that I write the global map into a CSV file (custom java code again) and read it with tFileInputDelimted...not very elegant, was hoping there is a way to iterate in-memory over the globalMap and inject it directly as an input row</description>
      <pubDate>Tue, 17 May 2011 20:35:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210790#M9080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-17T20:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210791#M9081</link>
      <description>probably the cleanest way to do this is to process the data in one subjob, and then read from your hash in a second subjob:&lt;BR /&gt;input--&amp;gt;tJavaFlex&lt;BR /&gt;|&lt;BR /&gt;onSubjobOK&lt;BR /&gt;|&lt;BR /&gt;tJavaFlex--&amp;gt;output&lt;BR /&gt;in the second tJavaFlex, you can iterate over the globalMap and output rows</description>
      <pubDate>Tue, 17 May 2011 20:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210791#M9081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-17T20:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210792#M9082</link>
      <description>I see your point, gonna give it a try. Thx</description>
      <pubDate>Wed, 18 May 2011 12:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210792#M9082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-18T12:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210793#M9083</link>
      <description>John, &lt;BR /&gt;I'm missing something...if I put something like &lt;BR /&gt;&lt;PRE&gt;for (int i = 0; i &amp;lt; 5; i ++) {&lt;BR /&gt;row15.dc1 = i;&lt;BR /&gt;row15.dc2 = i+1;&lt;BR /&gt;}&lt;/PRE&gt;&lt;BR /&gt;in the MAIN for tjavaflex, it only outputs 1 row. (the last one of the iteration actually)</description>
      <pubDate>Wed, 18 May 2011 12:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210793#M9083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-18T12:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] retrieve globalMap to row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210794#M9084</link>
      <description>Ok found the solution here: 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCnjICAS" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-tJavaFlex-multiple-rows/td-p/90245&lt;/A&gt; 
&lt;BR /&gt;basically the loop has to be opened in the START part 
&lt;BR /&gt; 
&lt;PRE&gt;for (int i = 0; i &amp;lt; 3; i   ) {&lt;/PRE&gt; 
&lt;BR /&gt;rows go in the MAIN part 
&lt;BR /&gt; 
&lt;PRE&gt;row15.dc1 = i;&lt;BR /&gt;row15.dc2 = i 1;&lt;/PRE&gt; 
&lt;BR /&gt;and the closing of the loop goes to the END part. 
&lt;BR /&gt; 
&lt;PRE&gt;}&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2011 12:33:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-retrieve-globalMap-to-row/m-p/2210794#M9084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-18T12:33:51Z</dc:date>
    </item>
  </channel>
</rss>

