<?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: Insert data generated by ArrayList and HashMap with manual code  into DATABASE in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368038#M131350</link>
    <description>&lt;P&gt;Thank You so much for your respponse&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;After&amp;nbsp; Creation of this HashMap how can i pass this arrayList to a component ?&lt;BR /&gt;using a context or global variable?&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 15:37:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-07-24T15:37:11Z</dc:date>
    <item>
      <title>Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368034#M131346</link>
      <description>&lt;P&gt;I have created the "ArrayList" in tJava which explored below briefly&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;List&amp;lt;String&amp;gt; headers = new ArrayList&amp;lt;String&amp;gt;();&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;headers.add("Name");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;headers.add("Age");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;headers.add("Package");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;List&amp;lt;HashMap&amp;lt;String, String&amp;gt;&amp;gt; rows = new ArrayList&amp;lt;HashMap&amp;lt;String,String&amp;gt;&amp;gt;();&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;HashMap&amp;lt;String, String&amp;gt; row1 = new HashMap&amp;lt;String, String&amp;gt;();&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row1.put("Name","Meet");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row1.put("Age","10");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row1.put("Package", "10.25");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;HashMap&amp;lt;String, String&amp;gt; row2 = new HashMap&amp;lt;String, String&amp;gt;();&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row2.put("Name","Dhaval");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row2.put("Age","20");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row2.put("Package", "45.23");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;HashMap&amp;lt;String, String&amp;gt; row3 = new HashMap&amp;lt;String, String&amp;gt;();&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row3.put("Name","Hemali");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row3.put("Age","15");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;row3.put("Package", "25.2");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;rows.add(row1);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;rows.add(row2);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;rows.add(row3);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="andale mono,times"&gt;this.globalMap.put("rows", rows);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;In &lt;STRONG&gt;tJava&amp;nbsp;&lt;/STRONG&gt;component this code has been written and I wanted to insert these 3 data into the database.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;, &lt;STRONG&gt;Age&lt;/STRONG&gt;, &lt;STRONG&gt;Package&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Meet, 10, 10.25&lt;/P&gt; 
&lt;P&gt;Dhaval, 20, 45.23&lt;/P&gt; 
&lt;P&gt;Hemali, 20, 25.2&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I achieve this with scenario minimum use of components and with an efficient way?&lt;BR /&gt;Please suggest asap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Meet Mahajan&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 14:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368034#M131346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T14:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368035#M131347</link>
      <description>&lt;P&gt;Put your code into the Start Code section of a tJavaFlex component. At the end of your code, crate an iterator for your ArrayList and open a while loop to iterate over the ArrayList. DO NOT CLOSE IT HERE.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now create an output schema matching your data set for your tJavaFlexin. In the Main Code section (consider this section as a looping section in the middle of a while or for loop), use the iterator created in the Start Code to get values for your output columns. For example.....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;HashMap row = it.next();
row1.Name = row.get("Name");
row1.Age = row.get("Age");
row1.Package = row.get("Package");&lt;/PRE&gt; 
&lt;P&gt;Then in the End Code section just close your loop.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You will arguably want to do more here, but the key is learning how the tJavaFlex works. Just consider it as a loop with the Main Code being the body of the loop, the Start Code being the code fired ONCE before the loop and the End Code fired ONCE afterwards.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368035#M131347</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T15:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368036#M131348</link>
      <description>&lt;P&gt;First of all... why the : asap !? It's kinda rude! Every question on this forum is preferably answered as soon as possible... dont be a doucebag, you are as equally important as anybody else here.&lt;/P&gt; 
&lt;P&gt;Could you elaborate please ... I dont understand why java code is involved, its static not dynamic?&lt;BR /&gt;Simply iterate over a tForEach item or something component -&amp;gt; tIterateToFlow -&amp;gt; tDBoutput.&lt;BR /&gt;Within the &lt;SPAN&gt;tForEach&amp;nbsp;&lt;/SPAN&gt;put a String arrays&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;( String[] { "Meet" , 2, "CCC", "DDD", "EEE"})&lt;BR /&gt;( String[] { "Daval" , 12 , "X" , "Morty", "Rick"})&lt;/PRE&gt; 
&lt;P&gt;From the tForEach you get the current value and assign it to Name :&lt;/P&gt; 
&lt;PRE&gt;((String[])globalMap.get("tForeach_1_CURRENT_VALUE"))[0]&lt;BR /&gt;-&amp;gt; return : "Meet" &lt;BR /&gt;and the [1] will return : 2&lt;/PRE&gt; 
&lt;P&gt;Next iteration will give you the next array and its values.&lt;/P&gt; 
&lt;P&gt;Suggest using this flow/process design.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368036#M131348</guid>
      <dc:creator>Jesperrekuh</dc:creator>
      <dc:date>2018-07-24T15:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368037#M131349</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMrOAAW"&gt;@Dijke&lt;/A&gt;&amp;nbsp;if you find this rude, but i was badly stucked in this Scenario and that's why i asked for quick possible response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;About Flow design&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I fetch the headers from database which is dynamic can be vary from 10-20&amp;nbsp;and data should get inserted everytime&amp;nbsp;when this code runs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368037#M131349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T15:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368038#M131350</link>
      <description>&lt;P&gt;Thank You so much for your respponse&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;After&amp;nbsp; Creation of this HashMap how can i pass this arrayList to a component ?&lt;BR /&gt;using a context or global variable?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:37:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368038#M131350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T15:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368039#M131351</link>
      <description>&lt;P&gt;You don't need to pass the ArrayList to get the data into a database. Just do as I suggested and your data will be sent to the database row by row. However, if you want to pass an ArrayList via a row in Talend, simply pass it as an Object and cast it at the other end.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368039#M131351</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T15:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368040#M131352</link>
      <description>&lt;P&gt;Has this solved your problem? If so, can you mark the solution as accepted please&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 09:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368040#M131352</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-25T09:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data generated by ArrayList and HashMap with manual code  into DATABASE</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368041#M131353</link>
      <description>&lt;P&gt;Thanks for the response and solution regarding this problem&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Execution is in Process. When it is done definitely, I'll&amp;nbsp;do that.&lt;/P&gt; 
&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Meet Mahajan&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 09:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-data-generated-by-ArrayList-and-HashMap-with-manual-code/m-p/2368041#M131353</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-25T09:50:05Z</dc:date>
    </item>
  </channel>
</rss>

