<?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 read a csv file into a Java list in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283807#M57631</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm struggling to read a local file and get the contents into a java list for processing.&lt;/P&gt;
&lt;P&gt;For example, the file might contain:&lt;/P&gt;
&lt;P&gt;cat&lt;/P&gt;
&lt;P&gt;dog&lt;/P&gt;
&lt;P&gt;mouse&lt;/P&gt;
&lt;P&gt;and the java list would be populated with these 3 values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had assumed&amp;nbsp;tfileinputdelimited would work but it always wants create name/value pairs whereas I just want a list of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2020 12:03:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-04T12:03:31Z</dc:date>
    <item>
      <title>read a csv file into a Java list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283807#M57631</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm struggling to read a local file and get the contents into a java list for processing.&lt;/P&gt;
&lt;P&gt;For example, the file might contain:&lt;/P&gt;
&lt;P&gt;cat&lt;/P&gt;
&lt;P&gt;dog&lt;/P&gt;
&lt;P&gt;mouse&lt;/P&gt;
&lt;P&gt;and the java list would be populated with these 3 values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had assumed&amp;nbsp;tfileinputdelimited would work but it always wants create name/value pairs whereas I just want a list of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 12:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283807#M57631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-04T12:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: read a csv file into a Java list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283808#M57632</link>
      <description>&lt;P&gt;Talend works using the concept of rows and columns. If you are reading data from a CSV file, that is data stored in a row/column fashion. However, you can assign your data into any Java object you like. Just use a tJavaFlex with code like this....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Start Code&lt;/P&gt; 
&lt;PRE&gt;// start part of your Java code
java.util.ArrayList&amp;lt;String&amp;gt; al = new java.util.ArrayList&amp;lt;String&amp;gt;();&lt;/PRE&gt; 
&lt;P&gt;Main Code&lt;/P&gt; 
&lt;PRE&gt;// here is the main part of the component,
// a piece of code executed in the row
// loop
al.add(row2.animal);&lt;/PRE&gt; 
&lt;P&gt;End Code&lt;/P&gt; 
&lt;PRE&gt;// end of the component, outside/closing the loop
globalMap.put("al", al);&lt;/PRE&gt; 
&lt;P&gt;In the above I am creating an ArrayList, assigning each row's "animal" column value to it and then storing the ArrayList in the globalMap to be used anywhere else in the job.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 12:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283808#M57632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-04T12:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: read a csv file into a Java list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283809#M57633</link>
      <description>Forget this, I didn't saw other messages.&lt;BR /&gt;&lt;BR /&gt;How is configured your tFileInputDelimited component? It should have a single field in the schema.</description>
      <pubDate>Tue, 04 Feb 2020 12:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/read-a-csv-file-into-a-Java-list/m-p/2283809#M57633</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-02-04T12:11:41Z</dc:date>
    </item>
  </channel>
</rss>

