<?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: pass dynamic value of a context variable in param file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/pass-dynamic-value-of-a-context-variable-in-param-file/m-p/2249317#M33897</link>
    <description>Would ...&lt;BR /&gt;&lt;PRE&gt;context.archive+Talend.getDate("yyyy-MM-dd")&amp;nbsp;&lt;/PRE&gt;&lt;BR /&gt;...be acceptable in your tFileCopy component? The getDate function in your flat file will just be handled as a String when you import it as a context variable. But, unless there is a reason for not generating the date part in your job, using the code above should work for you.</description>
    <pubDate>Sun, 11 Sep 2016 19:17:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-11T19:17:20Z</dc:date>
    <item>
      <title>pass dynamic value of a context variable in param file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/pass-dynamic-value-of-a-context-variable-in-param-file/m-p/2249316#M33896</link>
      <description>HI 
&lt;BR /&gt; 
&lt;BR /&gt;I've one job which creates a file and puts into output folder. 
&lt;BR /&gt;After that I calls other job to move file from output to archive folder. It works fine. 
&lt;BR /&gt;My requirement is for moving the file from output to archive folder I'm using tfilecopy component. 
&lt;BR /&gt;And in that tfilecopy the destination field path is coming from param file. 
&lt;BR /&gt; 
&lt;BR /&gt;For example: 
&lt;BR /&gt;File Name: ((String)globalMap.get(tfilelist_1_CURRENT_FILEPATH)) 
&lt;BR /&gt;Destination: context.archive 
&lt;BR /&gt; 
&lt;BR /&gt;Value of context variable archive in param file is like this archive=D:/Files/Archive/ 
&lt;BR /&gt; 
&lt;BR /&gt;Upto this point file comes in output folder and after that moved into archive folder. 
&lt;BR /&gt;The job runs daily and creates some files in output folder. I want to store every day files in their respective folders with the date name into archive folder. 
&lt;BR /&gt; 
&lt;BR /&gt;For example..Let say my job runs on 1 Sept 2016 and generates two files in output folder. 
&lt;BR /&gt;I want to move that files from output folder to folder with folder name "1-09-2016" that should be created at run time in archive folder. And so on.. 
&lt;BR /&gt; 
&lt;BR /&gt;I know that can be done in if I pass value in Destination filed in tfilecopy like this "D:/Files/Archive/"+Talend.getDate("yyyy-MM-dd")+" 
&lt;BR /&gt;My question is that possible I could pass this value from param file ? like this 
&lt;BR /&gt;archive=D:/Files/Archive/"+Talend.getDate("yyyy-MM-dd")+" 
&lt;BR /&gt;Any suggestion ?</description>
      <pubDate>Sun, 11 Sep 2016 11:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/pass-dynamic-value-of-a-context-variable-in-param-file/m-p/2249316#M33896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-11T11:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: pass dynamic value of a context variable in param file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/pass-dynamic-value-of-a-context-variable-in-param-file/m-p/2249317#M33897</link>
      <description>Would ...&lt;BR /&gt;&lt;PRE&gt;context.archive+Talend.getDate("yyyy-MM-dd")&amp;nbsp;&lt;/PRE&gt;&lt;BR /&gt;...be acceptable in your tFileCopy component? The getDate function in your flat file will just be handled as a String when you import it as a context variable. But, unless there is a reason for not generating the date part in your job, using the code above should work for you.</description>
      <pubDate>Sun, 11 Sep 2016 19:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/pass-dynamic-value-of-a-context-variable-in-param-file/m-p/2249317#M33897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-11T19:17:20Z</dc:date>
    </item>
  </channel>
</rss>

