<?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 dynamic file name in FTPget in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278313#M53832</link>
    <description>Hi, Please help.&lt;BR /&gt;I need to get the files  "fill_*_tst.txt" from sFTP server.&lt;BR /&gt;When I specify the file name, it works. but I tried to create a dynamic name, it is not working in tFTPget.&lt;BR /&gt;HEre is the code I input in 'filemask", which can be wrong.&lt;BR /&gt;"fill_"  + TalendDate.formatDate("yyyyMMdd", TalendDate.getCurrentDate()) + "_*_tst.txt"&lt;BR /&gt;How can I do that?&lt;BR /&gt;Thank you.</description>
    <pubDate>Sat, 16 Nov 2024 13:20:46 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2024-11-16T13:20:46Z</dc:date>
    <item>
      <title>dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278313#M53832</link>
      <description>Hi, Please help.&lt;BR /&gt;I need to get the files  "fill_*_tst.txt" from sFTP server.&lt;BR /&gt;When I specify the file name, it works. but I tried to create a dynamic name, it is not working in tFTPget.&lt;BR /&gt;HEre is the code I input in 'filemask", which can be wrong.&lt;BR /&gt;"fill_"  + TalendDate.formatDate("yyyyMMdd", TalendDate.getCurrentDate()) + "_*_tst.txt"&lt;BR /&gt;How can I do that?&lt;BR /&gt;Thank you.</description>
      <pubDate>Sat, 16 Nov 2024 13:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278313#M53832</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278314#M53833</link>
      <description>Im confused, you first say
&lt;BR /&gt;"fill_*_tst.txt"
&lt;BR /&gt;but then you add the date, is this correct? if you were going by the original pattern, shouldnt it be:
&lt;BR /&gt;fill_" + TalendDate.formatDate("yyyyMMdd", TalendDate.getCurrentDate()) + "_tst.txt" ?
&lt;BR /&gt;Remember, in filemask, using * is a wildcard character...</description>
      <pubDate>Wed, 21 Jul 2010 16:22:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278314#M53833</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-07-21T16:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278315#M53834</link>
      <description>Sorry I wasn't clear.&lt;BR /&gt;Files in the server are named as "fil_20100721_2222_tst.txt" or "fil_20100721_2223_tst.txt".&lt;BR /&gt;So I want to get all the files for  "fil_YYYYMMDD_*_tst.txt" with wild card in it.</description>
      <pubDate>Wed, 21 Jul 2010 16:33:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278315#M53834</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T16:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278316#M53835</link>
      <description>So when I tested with a filename (fill_20100720_*_tst.txt), it worked throuhg tFTPget. but I need to generate the file name everyday.</description>
      <pubDate>Wed, 21 Jul 2010 16:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278316#M53835</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T16:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278317#M53836</link>
      <description>Personally, I like to set my dates in the beginning of the flow using tJava using a context parameter. 
&lt;BR /&gt;First, create a context parameter something like context.todaysDate 
&lt;BR /&gt;Then in the beginning of the flow add a tJava and connect it with SubJobOk to the next in the flow. Add this in the component code: 
&lt;BR /&gt;GregorianCalendar instance = new GregorianCalendar(); 
&lt;BR /&gt;SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); 
&lt;BR /&gt;context.todaysDate = formatter.format(instance.getTime()); 
&lt;BR /&gt;Then you will use this in the filemask: 
&lt;BR /&gt;"fill_" + context.todaysDate + "_*_tst.txt" 
&lt;BR /&gt;Its a little more work, but that way I can just use one set context parameter throughout the job, and its easier to handle overall.</description>
      <pubDate>Wed, 21 Jul 2010 16:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278317#M53836</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-07-21T16:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278318#M53837</link>
      <description>Thanks a lot. I will try it.</description>
      <pubDate>Wed, 21 Jul 2010 16:49:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278318#M53837</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T16:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278319#M53838</link>
      <description>Does it require any imports?</description>
      <pubDate>Wed, 21 Jul 2010 22:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278319#M53838</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T22:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278320#M53839</link>
      <description>somehow it doesn't work. simply I tried to add String variable in tJava code as following.
&lt;BR /&gt;String filename = "fil_20100720_2226_tst.txt";
&lt;BR /&gt;And tFTPget, I put file mask 'filename' but I get an error "filename cannot be resolved". How can I call the variable from filemask? do you have an example? Thanks for your help.</description>
      <pubDate>Wed, 21 Jul 2010 22:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278320#M53839</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T22:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278321#M53840</link>
      <description>Hi, I tried your code but I got this error. 
&lt;BR /&gt;context.todaysDate cannot be resolved or is not a field 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Personally, I like to set my dates in the beginning of the flow using tJava using a context parameter.&lt;BR /&gt;First, create a context parameter something like context.todaysDate&lt;BR /&gt;Then in the beginning of the flow add a tJava and connect it with SubJobOk to the next in the flow. Add this in the component code:&lt;BR /&gt;GregorianCalendar instance = new GregorianCalendar();&lt;BR /&gt;SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");&lt;BR /&gt;context.todaysDate = formatter.format(instance.getTime());&lt;BR /&gt;Then you will use this in the filemask:&lt;BR /&gt;"fill_" + context.todaysDate + "_*_tst.txt"&lt;BR /&gt;Its a little more work, but that way I can just use one set context parameter throughout the job, and its easier to handle overall.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 21 Jul 2010 22:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278321#M53840</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T22:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278322#M53841</link>
      <description>Hi,&lt;BR /&gt;The FileMask value expected in your case is : &lt;BR /&gt;"fil_"+TalendDate.getDate("YYYYMMDD")+"_*_tst.txt"&lt;BR /&gt;Let me know if that resolve your issue.&lt;BR /&gt;The function TalendDate.getDate("DATE_PATTERN") return the current date of your machine/server and format it following the expected format.&lt;BR /&gt;For example you date is YYYYMMDD : It's return 20100722; if your date is YYYY-DD-MM : It's return 2010-22-07.&lt;BR /&gt;Using my FileMask in your tFTPGet will GET all the files start by : fil_20100722_ - and finishing by _tst.txt&lt;BR /&gt;Have a good test.&lt;BR /&gt;Best regards;</description>
      <pubDate>Thu, 22 Jul 2010 14:48:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278322#M53841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-22T14:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278323#M53842</link>
      <description>Thanks. I am going to try that way. &lt;BR /&gt;One quick question, If I want to get Yesterday's date,  TalendDate.getDate("YYYYMMDD") - 1 will work?</description>
      <pubDate>Thu, 22 Jul 2010 16:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278323#M53842</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-22T16:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278324#M53843</link>
      <description>I haven't tried, am I'm not a java expert, but I suspect not.&lt;BR /&gt;I use TalendDate.addDate and a context variable to do this.&lt;BR /&gt;context.myDate = Calendar.getInstance().getTime();&lt;BR /&gt;context.myDate = TalendDate.addDate(context.myDate, -1, "dd");</description>
      <pubDate>Thu, 22 Jul 2010 18:07:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278324#M53843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-22T18:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278325#M53844</link>
      <description>TalendDate.addDate  works. Thank you for all your help.</description>
      <pubDate>Thu, 22 Jul 2010 18:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278325#M53844</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-22T18:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278326#M53845</link>
      <description>I am putting together a small POC using Talend toolkit (v5.0.1.r74687) and this example is is exactly what I'm looking to do, but when I run the job, it will not compile, giving me an error saying that "GregorianCalendar cannot be resolved to a type" and highlighting the tJava object (expectantly I guess) as to the source of the error. 
&lt;BR /&gt;Any pointers as to what I'm doing wrong would be most welcome as its the first hurdle in 3 days of playing with this software that I've been unable to resolve myself (with the help of talendforge and/or google anyway)</description>
      <pubDate>Fri, 17 Feb 2012 15:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278326#M53845</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-02-17T15:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278327#M53846</link>
      <description>Try fully qualifying it, eg: &lt;BR /&gt;java.util.GregorianCalendar = new java.util.GregorianCalendar();</description>
      <pubDate>Fri, 17 Feb 2012 16:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278327#M53846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-17T16:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic file name in FTPget</title>
      <link>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278328#M53847</link>
      <description>hi Yunee,
&lt;BR /&gt; Could u paste the screen shot ofyour job here.</description>
      <pubDate>Tue, 09 Oct 2012 08:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/dynamic-file-name-in-FTPget/m-p/2278328#M53847</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-10-09T08:48:04Z</dc:date>
    </item>
  </channel>
</rss>

