<?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 [resolved] How to read the same file twice in a flow ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301809#M73876</link>
    <description>I have a scenario in which I need to do the following: 
&lt;BR /&gt;1) Read File A - Based upon some data contained in the file create a record of type "PI01" 
&lt;BR /&gt;2) Read File A (Same File)- Based upon some data contained in the file create a record of type "AL01" 
&lt;BR /&gt;3) merge data of (1) and (2) and create an output XML 
&lt;BR /&gt;When I tried to map it as a Job, for (1) and (2), I used FielName: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) as per my Job diagram but when I run it, 
&lt;BR /&gt; get a run time exception saying that the (2) cannot get the FileName and is unable to read the record, There is no problem with (1) 
&lt;BR /&gt;Do you know how to achieve this scenario where I have to read the same file again and again, create several types of record and then merge all the records together 
&lt;BR /&gt;Thanks</description>
    <pubDate>Sat, 16 Nov 2024 13:49:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:49:01Z</dc:date>
    <item>
      <title>[resolved] How to read the same file twice in a flow ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301809#M73876</link>
      <description>I have a scenario in which I need to do the following: 
&lt;BR /&gt;1) Read File A - Based upon some data contained in the file create a record of type "PI01" 
&lt;BR /&gt;2) Read File A (Same File)- Based upon some data contained in the file create a record of type "AL01" 
&lt;BR /&gt;3) merge data of (1) and (2) and create an output XML 
&lt;BR /&gt;When I tried to map it as a Job, for (1) and (2), I used FielName: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) as per my Job diagram but when I run it, 
&lt;BR /&gt; get a run time exception saying that the (2) cannot get the FileName and is unable to read the record, There is no problem with (1) 
&lt;BR /&gt;Do you know how to achieve this scenario where I have to read the same file again and again, create several types of record and then merge all the records together 
&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 16 Nov 2024 13:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301809#M73876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to read the same file twice in a flow ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301810#M73877</link>
      <description>Hello 
&lt;BR /&gt;Put your tFileInputDelimited, tMap, tFileOutputXML component in a child job. 
&lt;BR /&gt;eg: 
&lt;BR /&gt;On father job: 
&lt;BR /&gt;tFileList--iterate--&amp;gt;tRunJob(run the child job) 
&lt;BR /&gt;On child job: 
&lt;BR /&gt;tFileInputDelimited_1--&amp;gt;tmap--&amp;gt;tFileOutputxml 
&lt;BR /&gt; | 
&lt;BR /&gt; tFileInputDelimited_2 
&lt;BR /&gt;Define a context var called filename in child job. 
&lt;BR /&gt;On tRunJob, select the child job, add a parameter: filename on the 'context param' table and set the value as: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) 
&lt;BR /&gt;on tFileInputDelimited_1, tFileInputDelimited_2, set the 'File Name' field with context var: context.filename 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 18 Aug 2009 03:54:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301810#M73877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-18T03:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to read the same file twice in a flow ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301811#M73878</link>
      <description>thank you shong.. it works...</description>
      <pubDate>Tue, 18 Aug 2009 05:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-read-the-same-file-twice-in-a-flow/m-p/2301811#M73878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-18T05:52:46Z</dc:date>
    </item>
  </channel>
</rss>

