<?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 MongoDb Output - How to Write Array fields/values in a collection? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350801#M117588</link>
    <description>Hello, 
&lt;BR /&gt;I have a need to write string arrays into a mongodb collection and I am using Talend Big Data and the components that come with that. 
&lt;BR /&gt;However, I do not see any option to define the output field as an array. Is writing to array possible? 
&lt;BR /&gt;Example: 
&lt;BR /&gt;This is the key/value format I need in my collection. 
&lt;BR /&gt;search_key:</description>
    <pubDate>Sat, 16 Nov 2024 12:00:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T12:00:42Z</dc:date>
    <item>
      <title>MongoDb Output - How to Write Array fields/values in a collection?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350801#M117588</link>
      <description>Hello, 
&lt;BR /&gt;I have a need to write string arrays into a mongodb collection and I am using Talend Big Data and the components that come with that. 
&lt;BR /&gt;However, I do not see any option to define the output field as an array. Is writing to array possible? 
&lt;BR /&gt;Example: 
&lt;BR /&gt;This is the key/value format I need in my collection. 
&lt;BR /&gt;search_key:</description>
      <pubDate>Sat, 16 Nov 2024 12:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350801#M117588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: MongoDb Output - How to Write Array fields/values in a collection?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350802#M117589</link>
      <description>Hi, 
&lt;BR /&gt;I think you need a 
&lt;A href="https://help.talend.com/search/all?query=tJavaFlex&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;tjavaflex&lt;/A&gt; component in your job design. 
&lt;BR /&gt;See the related forum 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCpAyCAK" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-creating-and-using-Arraylists-in-Talend/td-p/100161&lt;/A&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 31 May 2013 04:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350802#M117589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-31T04:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: MongoDb Output - How to Write Array fields/values in a collection?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350803#M117590</link>
      <description>Thank you. This is good insight. However, I am getting the value of NULL now. 
&lt;BR /&gt;Here is what I am doing: 
&lt;BR /&gt;tMongodbConnection --&amp;gt; 
&lt;BR /&gt;SQLInput --&amp;gt; tjavaflex --&amp;gt; tmap --&amp;gt; tMongoOutput 
&lt;BR /&gt;tjavaflex: 
&lt;BR /&gt;Start: 
&lt;BR /&gt;// start part of your Java code 
&lt;BR /&gt;java.util.ArrayList list1 = new java.util.ArrayList(); 
&lt;BR /&gt; 
&lt;BR /&gt;Main: 
&lt;BR /&gt;list1.add("hello"); 
&lt;BR /&gt;list1.add("there"); 
&lt;BR /&gt;list1.add("test"); 
&lt;BR /&gt;globalMap.put("latlong", list1); 
&lt;BR /&gt;------------------- 
&lt;BR /&gt;Then in tmap, I on right side, I have: 
&lt;BR /&gt;column: latlongtest, type: list, Expression: (java.util.ArrayList)globalMap.get("latlong") 
&lt;BR /&gt; 
&lt;BR /&gt;I also tried entering (java.util.ArrayList)globalMap.get("latlong") in the Variable section but still getting NULL in mongodb. 
&lt;BR /&gt;latlongtest is defined as list in mongodb schema. 
&lt;BR /&gt;Please help as my project is due on Monday. 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 31 May 2013 06:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350803#M117590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-31T06:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: MongoDb Output - How to Write Array fields/values in a collection?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350804#M117591</link>
      <description>Hi, 
&lt;BR /&gt;To make a testing for that, you can use a tlogrow instead of tMongoOutput in your work flow to see if there any data can be out put on console?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 31 May 2013 07:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350804#M117591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-31T07:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: MongoDb Output - How to Write Array fields/values in a collection?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350805#M117592</link>
      <description>I did try tLogRow and it shows null.
&lt;BR /&gt;Is there any documentation of Array/List and globalMap.put?</description>
      <pubDate>Fri, 31 May 2013 07:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/MongoDb-Output-How-to-Write-Array-fields-values-in-a-collection/m-p/2350805#M117592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-31T07:33:12Z</dc:date>
    </item>
  </channel>
</rss>

