<?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] How to create a java Map from iterate ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318971#M89267</link>
    <description>It's work, thank you shong. :cool:</description>
    <pubDate>Tue, 26 Jan 2010 10:57:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-26T10:57:58Z</dc:date>
    <item>
      <title>[resolved] How to create a java Map from iterate ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318969#M89265</link>
      <description>Hello,
&lt;BR /&gt;I need to read a row from input and create a new Map in output.
&lt;BR /&gt;Can tJavaFlex do this, and how can I forword the new flow map for output ? :/
&lt;BR /&gt;My java code is like this: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;java.util.List&amp;lt;String&amp;gt; fibres= new java.util.ArrayList&amp;lt;String&amp;gt;();&lt;BR /&gt;String Id_cable=input_row.Noeud.trim();&lt;BR /&gt;Integer Nb_tube=input_row.TUBES;	&lt;BR /&gt;Integer Compositio=input_row.COMPOSITIO;&lt;BR /&gt;String Id_tube=input_row.Id_tube;&lt;BR /&gt;if (Nb_tube&amp;gt;0)&lt;BR /&gt;{   	// only one tube input&lt;BR /&gt;	for (int i=1;i&amp;lt;=Nb_tube; i++) {&lt;BR /&gt;		 Id_tube=Id_cable+"T"+i;&lt;BR /&gt;		if(Compositio&amp;gt;0)&lt;BR /&gt;		{&lt;BR /&gt;			String Id_fibre="";&lt;BR /&gt;			for(int j=1;j&amp;lt;=Compositio;j++){ &lt;BR /&gt;				//a new calculated row,for one input row of tube&lt;BR /&gt;				// I will have many rows of calculated fibres.&lt;BR /&gt;				Id_fibre= Id_tube.trim()+"F"+j;                                    			  &lt;BR /&gt;				fibres.add(Id_fibre,Id_fibre);&lt;BR /&gt;				fibres.add(Id_tube,Id_tube); 					&lt;BR /&gt;			}&lt;BR /&gt;		}  	&lt;BR /&gt;	}			 &lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;May I use tJavaFlex+tFlowtoIterate+tFixedFlow, and how can I use tJavaFlex with 2* for loop ? &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 
&lt;BR /&gt;Thank you in advance .</description>
      <pubDate>Sat, 16 Nov 2024 13:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318969#M89265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to create a java Map from iterate ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318970#M89266</link>
      <description>Hello 
&lt;BR /&gt;Yes, tJavaFlex component fix your need. See my screenshots.
&lt;BR /&gt;code on begin part:
&lt;BR /&gt;
&lt;PRE&gt;// start part of your Java code&lt;BR /&gt;java.util.Map&amp;lt;String,String&amp;gt; fibres= new java.util.HashMap&amp;lt;String,String&amp;gt;();&lt;BR /&gt;String Id_cable;&lt;BR /&gt;Integer Nb_tube;    &lt;BR /&gt;Integer Compositio;&lt;BR /&gt;String Id_tube;&lt;/PRE&gt;
&lt;BR /&gt;code on main part:
&lt;BR /&gt;
&lt;PRE&gt;			  Id_cable=row1.Noeud.trim();&lt;BR /&gt;			  Nb_tube=row1.TUBES;    &lt;BR /&gt;			  Compositio=row1.COMPOSITIO;&lt;BR /&gt;			  Id_tube=row1.Id_tube;&lt;BR /&gt;			  if (Nb_tube&amp;gt;0)&lt;BR /&gt;			  {       // only one tube input&lt;BR /&gt;			      for (int i=1;i&amp;lt;=Nb_tube; i++) {&lt;BR /&gt;			          Id_tube=Id_cable+"T"+i;&lt;BR /&gt;			          if(Compositio&amp;gt;0)&lt;BR /&gt;			          {&lt;BR /&gt;			              String Id_fibre="";&lt;BR /&gt;			              for(int j=1;j&amp;lt;=Compositio;j++){ &lt;BR /&gt;			                  //a new calculated row,for one input row of tube&lt;BR /&gt;			                  // I will have many rows of calculated fibres.&lt;BR /&gt;			                  Id_fibre= Id_tube.trim()+"F"+j;                                                  &lt;BR /&gt;			                  fibres.put(Id_fibre,Id_fibre);&lt;BR /&gt;			                  fibres.put(Id_tube,Id_tube);                     &lt;BR /&gt;			              }&lt;BR /&gt;			          }      &lt;BR /&gt;			      }             &lt;BR /&gt;			  }&lt;/PRE&gt;
&lt;BR /&gt;code on end part:
&lt;BR /&gt;
&lt;PRE&gt;// end of the component, outside/closing the loop&lt;BR /&gt; globalMap.put("fibres",fibres);&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 26 Jan 2010 09:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318970#M89266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-26T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to create a java Map from iterate ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318971#M89267</link>
      <description>It's work, thank you shong. :cool:</description>
      <pubDate>Tue, 26 Jan 2010 10:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-create-a-java-Map-from-iterate/m-p/2318971#M89267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-26T10:57:58Z</dc:date>
    </item>
  </channel>
</rss>

