<?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 How to dynamically pass filename to tFTPRename in Talend? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348445#M115576</link>
    <description>I currently have a job that works like this: 
&lt;BR /&gt;tPrejob--&amp;gt;tOracleConnection1---&amp;gt;tOracleConnection2---&amp;gt;tSetGlobalVar1(timestamp)---&amp;gt;tRunjob(runs prejob to gather file from FTP) 
&lt;BR /&gt;Then there is a tPostjob that is supposed to rename the processed file on the FTP server. 
&lt;BR /&gt;tPostjob---&amp;gt;tFTPRename 
&lt;BR /&gt;It should be renaming the file with "File Processed On " + ((String)globalMap.get("timestamp")) + "This is where I would put the orginal file name" 
&lt;BR /&gt;If I put a standard filename into the Filemask then it will run correctly, however if I try to make the filemask dynamic by passing the filename into it through globalMap.get then I get the Error: "Exception in component tFTPRename_1 java.lang.NullPointerException" 
&lt;BR /&gt;I've tried several methods for passing the file name into the tFTPRename component, but none are working. 
&lt;BR /&gt;I'm currently capturing the file name in the subjob and outputting it to a txt file and then using tFileInputFullRow on the main job to create that variable. I tried passing this into a tSetGlobalVar and then adding it into the filemask as ((String)globalMap.get("FileName")), but had no luck. 
&lt;BR /&gt;I also tried several methods on the internet, but none of them worked, so I wasn't sure if it was me or if it has something to do with tFTPRename capabilities. 
&lt;BR /&gt;Thanks in advance to anyone who could help! 
&lt;BR /&gt;Main Job: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/forum/img/members/190225/mini_MainJob.png_20140718-1611.png" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/img/members/190225/mini_MainJob.png_20140718-1611.png&lt;/A&gt; 
&lt;BR /&gt;Sub-Job: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/forum/img/members/190225/mini_Prejob.png.png" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/img/members/190225/mini_Prejob.png.png&lt;/A&gt; 
&lt;BR /&gt;tFTPRename Configuation: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/forum/img/members/190225/mini_FTPconfige.png.png" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/img/members/190225/mini_FTPconfige.png.png&lt;/A&gt;</description>
    <pubDate>Thu, 17 Jul 2014 20:05:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-07-17T20:05:22Z</dc:date>
    <item>
      <title>How to dynamically pass filename to tFTPRename in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348445#M115576</link>
      <description>I currently have a job that works like this: 
&lt;BR /&gt;tPrejob--&amp;gt;tOracleConnection1---&amp;gt;tOracleConnection2---&amp;gt;tSetGlobalVar1(timestamp)---&amp;gt;tRunjob(runs prejob to gather file from FTP) 
&lt;BR /&gt;Then there is a tPostjob that is supposed to rename the processed file on the FTP server. 
&lt;BR /&gt;tPostjob---&amp;gt;tFTPRename 
&lt;BR /&gt;It should be renaming the file with "File Processed On " + ((String)globalMap.get("timestamp")) + "This is where I would put the orginal file name" 
&lt;BR /&gt;If I put a standard filename into the Filemask then it will run correctly, however if I try to make the filemask dynamic by passing the filename into it through globalMap.get then I get the Error: "Exception in component tFTPRename_1 java.lang.NullPointerException" 
&lt;BR /&gt;I've tried several methods for passing the file name into the tFTPRename component, but none are working. 
&lt;BR /&gt;I'm currently capturing the file name in the subjob and outputting it to a txt file and then using tFileInputFullRow on the main job to create that variable. I tried passing this into a tSetGlobalVar and then adding it into the filemask as ((String)globalMap.get("FileName")), but had no luck. 
&lt;BR /&gt;I also tried several methods on the internet, but none of them worked, so I wasn't sure if it was me or if it has something to do with tFTPRename capabilities. 
&lt;BR /&gt;Thanks in advance to anyone who could help! 
&lt;BR /&gt;Main Job: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/forum/img/members/190225/mini_MainJob.png_20140718-1611.png" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/img/members/190225/mini_MainJob.png_20140718-1611.png&lt;/A&gt; 
&lt;BR /&gt;Sub-Job: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/forum/img/members/190225/mini_Prejob.png.png" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/img/members/190225/mini_Prejob.png.png&lt;/A&gt; 
&lt;BR /&gt;tFTPRename Configuation: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/forum/img/members/190225/mini_FTPconfige.png.png" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/img/members/190225/mini_FTPconfige.png.png&lt;/A&gt;</description>
      <pubDate>Thu, 17 Jul 2014 20:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348445#M115576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-17T20:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically pass filename to tFTPRename in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348446#M115577</link>
      <description>Can you please post an image of your job? I'm wondering if you're not missing a tFlowtoIterate somewhere before referencing a value from a flow into a variable.</description>
      <pubDate>Thu, 17 Jul 2014 23:25:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348446#M115577</guid>
      <dc:creator>willm1</dc:creator>
      <dc:date>2014-07-17T23:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically pass filename to tFTPRename in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348447#M115578</link>
      <description>Hi, 
&lt;BR /&gt;Whether you have transmit context check box enabled in parent Job?, if not, enable the check box and test again... 
&lt;BR /&gt;Use print statement to check the value of variable in tPreJob 
&lt;BR /&gt;vaibhav</description>
      <pubDate>Fri, 18 Jul 2014 07:17:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348447#M115578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-18T07:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically pass filename to tFTPRename in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348448#M115579</link>
      <description>I added the screenshots and as an update, I can pass the global variable into the tFileInputXML components and have them read the file name being produced by tFlowtoIterate. So I'm thinking it is either a limitation of tFTPRename or something I have wrong in that component?</description>
      <pubDate>Fri, 18 Jul 2014 15:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-dynamically-pass-filename-to-tFTPRename-in-Talend/m-p/2348448#M115579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-18T15:14:28Z</dc:date>
    </item>
  </channel>
</rss>

