<?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: Problem with FTPPut when deleting the files afterwards in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285310#M58932</link>
    <description>Hi jlolling, 
&lt;BR /&gt;I'm sorry I didn't come back earlier to thank you for your answer, which was precise and helpful. 
&lt;BR /&gt;That's what I thought, the design is wrong, I need to do some refactoring 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Thanks again for your help.</description>
    <pubDate>Tue, 04 Feb 2014 15:55:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-04T15:55:29Z</dc:date>
    <item>
      <title>Problem with FTPPut when deleting the files afterwards</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285306#M58928</link>
      <description>Hi everyone,
&lt;BR /&gt;I'm getting a strange behaviour, and I think I'm doing something wrong in the configuration, so any help would be appreciated.
&lt;BR /&gt;Here is the scenario:
&lt;BR /&gt;I'm getting two files from a FTP.
&lt;BR /&gt;I transform them and put them back on the same FTP.
&lt;BR /&gt;Afterwards, I'm deleting the temporary files on my server.
&lt;BR /&gt;So the job looks like this (simplified version):
&lt;BR /&gt;
&lt;PRE&gt;// Get the files&lt;BR /&gt;tFTPGet -&amp;gt; &lt;BR /&gt;// Transform and put first file (lets call it subjob1)&lt;BR /&gt;tFileList_1 -&amp;gt; tFileInputDelimited -&amp;gt; tMap -&amp;gt; tFTPPut --onComponentOk-&amp;gt;&lt;BR /&gt;// Transform and put second file (subjob2)&lt;BR /&gt;tFileList_2 -&amp;gt; tFileInputDelimited -&amp;gt; tMap -&amp;gt; tFTPPut --onSubjobOk-&amp;gt;&lt;BR /&gt;// Delete temporary files (subjob3)&lt;BR /&gt;tFileList_3 -&amp;gt; tFileDelete&lt;/PRE&gt;
&lt;BR /&gt;When i'm running this job, I get the first file uploaded correctly (from subjob1), but not the second one (from subjob2).
&lt;BR /&gt;If I disable the subjob3 (tFileList_3 -&amp;gt; tFileDelete), I get the two files in my FTP folder...
&lt;BR /&gt;So my question is, why is the subjob3 triggered when the subjob2 is not finished?
&lt;BR /&gt;What am I doing wrong here?
&lt;BR /&gt;The solution I found (really ugly) is to add a "tFTPPut" in the subjob2, which generates an error "No files match", but at least the files are uploaded to my FTP directory:
&lt;BR /&gt;
&lt;PRE&gt;// Transform and put second file with hacking&lt;BR /&gt;tFileList_2 -&amp;gt; tFileInputDelimited -&amp;gt; tMap -&amp;gt; tFTPPut -&amp;gt; tFTPPut_2 --onSubjobOk-&amp;gt;&lt;/PRE&gt;
&lt;BR /&gt;This works, but I would like to find what's the correct solution...
&lt;BR /&gt;I'm using Talend Open Studio for Data Integration (5.1.1.r84309).
&lt;BR /&gt;Thanks for you help.
&lt;BR /&gt;
&lt;BR /&gt;Note: I also tried changing onSubjobOk by onComponentOk between subjob2 and subjob3, same results, the files is not uploaded without the hacking.</description>
      <pubDate>Tue, 28 Jan 2014 10:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285306#M58928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-28T10:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FTPPut when deleting the files afterwards</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285307#M58929</link>
      <description>I am not certain but you may try only using onSubjobOK and not using onComponentOK at all.
&lt;BR /&gt;I suspect there is an issue with subjob 2 and 3 running based on a component of subjob 1.</description>
      <pubDate>Tue, 28 Jan 2014 16:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285307#M58929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-28T16:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FTPPut when deleting the files afterwards</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285308#M58930</link>
      <description>Mike, 
&lt;BR /&gt;The problem is (i described the job wrongly sorry) that I don't have 'onSubjobOk' after 'tFileOutputDelimited', i only have 'onComponentOk'.. 
&lt;BR /&gt;Both subjobs looks like this: 
&lt;BR /&gt;tFileList_2 -&amp;gt; tFileInputDelimited -&amp;gt; tMap 
&lt;B&gt;-&amp;gt; tFileOutputDelimited -onComponentOk-&amp;gt;&lt;/B&gt; tFTPPut --onSubjobOk-&amp;gt; 
&lt;BR /&gt;So I can't apply your solution 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Should I put something in between tFileOutputDelimited and tFTPPut? 
&lt;BR /&gt;If yes, which component? 
&lt;BR /&gt;Thank you for your help.</description>
      <pubDate>Tue, 28 Jan 2014 17:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285308#M58930</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-28T17:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FTPPut when deleting the files afterwards</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285309#M58931</link>
      <description>Hi Mat77, 
&lt;BR /&gt;A subjob is everything whats uderlayed with the blue rectangle. A subjob is a complete Java method and proceed a flow or sometimes also an iteration. 
&lt;BR /&gt;The trigger OnSubjobOK fires if no error happened within this subjob (with all its input and output components). 
&lt;BR /&gt;On my experience it is a better design to capsulate the processing of one file in a job (call it *_worker) and run (tRunJob) this job for every file you have (iterating through a list of files). 
&lt;BR /&gt;I would add a context variable (currentFile) of type File (File is actually a String but provides you if you set it as prompt a file chooser dialog). In the tFileInputDelimited you use this context.currentFile als filename. 
&lt;BR /&gt;Probably you have to do something similar to the output file name. 
&lt;BR /&gt;Your worker looks like: 
&lt;BR /&gt;tFileInputDelimited -&amp;gt; tMap -&amp;gt; tFileOutputDelimited 
&lt;BR /&gt;and the trigger job looks like: 
&lt;BR /&gt;tFileList_2 -- iterate --&amp;gt; tRunJob (worker) and set the context variable currentFile with ((String) globalMap.get("tFileList_2_CURRENT_FILEPATH"))</description>
      <pubDate>Tue, 28 Jan 2014 22:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285309#M58931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-28T22:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with FTPPut when deleting the files afterwards</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285310#M58932</link>
      <description>Hi jlolling, 
&lt;BR /&gt;I'm sorry I didn't come back earlier to thank you for your answer, which was precise and helpful. 
&lt;BR /&gt;That's what I thought, the design is wrong, I need to do some refactoring 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Thanks again for your help.</description>
      <pubDate>Tue, 04 Feb 2014 15:55:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-with-FTPPut-when-deleting-the-files-afterwards/m-p/2285310#M58932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-04T15:55:29Z</dc:date>
    </item>
  </channel>
</rss>

