<?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: tFileOutput, get filename used in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312327#M83286</link>
    <description>&lt;P&gt;Ï don't see how that helps, tFileOutputPositional still doesn't output the filename it uses. So why would it help to connect the tFileCopy to it directly?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 08:37:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-02T08:37:40Z</dc:date>
    <item>
      <title>tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312320#M83279</link>
      <description>&lt;P&gt;Hi, after having created a file with tFileOutputPositional, how do i access the filename used? When writing the file i use a unique name, 'C:/in/work/" + (String)globalMap.get("tFileList_1_CURRENT_FILE") + "_" + java.util.UUID.randomUUID()', and the plan is to OnSubJubOK rename the file with tFileCopy. But i cannot find the filename used by tFileOutputPositional anywhere. In the 6.3 documentation it seems that it was added to the globalMap but I'm using 7.1 and it no longer seems to be apart of it.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:25:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312320#M83279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312321#M83280</link>
      <description>&lt;P&gt;Before passing the data to tFileOutputPositional you could process it through tJavarow like -&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;//Code generated according to input schema and output schema
output_row.newColumn = input_row.newColumn;
output_row.newColumn1 = input_row.newColumn1;
output_row.newColumn2 = input_row.newColumn2;&lt;/PRE&gt;
&lt;P&gt;and after that you could use your logic to derive the filename and store it in context or globalMap which you could use in the tFileOutputPositional - "&lt;EM&gt;File Name" &lt;/EM&gt;property as well in the tFileCopy in a different subjob.&lt;/P&gt;
&lt;PRE&gt;String uuid = UUID.randomUUID().toString();
String filename = "C:/Talend/"+ uuid +"/out.txt";
globalMap.put("filename", filename);
System.out.println("Filename: "+ (String)globalMap.get("filename"));&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312321#M83280</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2019-07-01T15:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312322#M83281</link>
      <description>&lt;P&gt;Have tried some similar to that, but couldn't get it to work as the filename part of tFileOutputPositional is initialized on subjob start. So directly after my tFileList component has run, the filename of&amp;nbsp;tFileOutputPositional is set :/.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312322#M83281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-01T15:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312323#M83282</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPgmAAG"&gt;@anpe&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of onSubjob Ok from tFileLIst you should put OnComponent Ok from the component just befor tFileCopy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you are using OnSubjobOk from tFileList, the CURRENT_FILE globalMap will be flushed, hence you will get null value in that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On Component Ok link from the component before tFileCopy will still keep the globalMap of tFileList till the execution is finished from tFileCopy and the second iteration will start from tFileList then only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Subhadip&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312323#M83282</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-01T15:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312324#M83283</link>
      <description>&lt;P&gt;Hi subhadip13, think you have misunderstood my problem. The problem is not the CURRENT_FILE variable. Put the filename that tFileOutputPositional use. My job can be seen below. It polls a folder and then does some mapping changes before writing a new file to disk. After that I want to move the newly created file, but need to know what the filename used was, as it is randomly set.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5os.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150095i5AE36B416264341A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5os.png" alt="0683p000009M5os.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312324#M83283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-01T15:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312325#M83284</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPgmAAG"&gt;@anpe&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry if I have misunderstood the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do an&amp;nbsp; "OnComponentOk" from tFileOutputPositional and use that link to tFileCopy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Subhadip&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 16:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312325#M83284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-01T16:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312326#M83285</link>
      <description>Based on the screenshot of the job shared, I think you could complete the flow in a single sub job where you could use tFileCopy after using tFileOutputPositional in that case you would be able to get/store the file names for every iteration.</description>
      <pubDate>Mon, 01 Jul 2019 16:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312326#M83285</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2019-07-01T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312327#M83286</link>
      <description>&lt;P&gt;Ï don't see how that helps, tFileOutputPositional still doesn't output the filename it uses. So why would it help to connect the tFileCopy to it directly?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 08:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312327#M83286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T08:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312328#M83287</link>
      <description>&lt;P&gt;For now i ended up in below solution, adding a tJava after tFileList to set the filename and add it to the globalMap (thus before tFileOutputPositional is initialized). It works, but is not exactly what I want. The current solution doesn't allow me to use any data inside the file when setting the filename, which I might want in the future.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5Up.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147654iBE6F22211B04F269/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5Up.png" alt="0683p000009M5Up.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 10:10:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312328#M83287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T10:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutput, get filename used</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312329#M83288</link>
      <description>That's exactly what I had suggested at the beginning to use tJavarow to derive the filename and use it later for your tFileOutputPositional task and also to have the tFileCopy immediately after and not in separate subjob. 
&lt;BR /&gt;Regarding your "use any data inside the file when setting the filename" - this could be done after your file is written, by reading the same file not sure though what you had meant apart from this.</description>
      <pubDate>Tue, 02 Jul 2019 11:43:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutput-get-filename-used/m-p/2312329#M83288</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2019-07-02T11:43:04Z</dc:date>
    </item>
  </channel>
</rss>

