<?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: Exclude File Mask in TFTPFileList in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307690#M79105</link>
    <description>&lt;P&gt;One way of achieving this would be to use Java code to filter out the files which you don't want to process in your subsequent steps.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;Code for tJava -&lt;/P&gt; 
&lt;PRE&gt;String s = ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")).substring(StringHandling.INDEX( ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")),".")).trim();
if(!s.equals(".xml")){
System.out.println(s);
context.fileName = ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"));
globalMap.put("tFTPFileProperties_2_FILENAME", null);
}&lt;/PRE&gt; 
&lt;P&gt;The above could would make sure that the immediate next component of tJava (in my example (tFTPFileProperties) won't receive the any xml file as part of it's iteration.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Sample job flow -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFTP-2.JPG" style="width: 428px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lxzs.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144446i2FA7490447BD65AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lxzs.jpg" alt="0683p000009Lxzs.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFTPFileProperties settings -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFTP-3.JPG" style="width: 730px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lxs8.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135867iF59FC01857FB7C91/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lxs8.jpg" alt="0683p000009Lxs8.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jun 2018 14:39:48 GMT</pubDate>
    <dc:creator>iamabhishek</dc:creator>
    <dc:date>2018-06-25T14:39:48Z</dc:date>
    <item>
      <title>Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307688#M79103</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the TFTPFileList component, but unlike the TFileList component which has exclude file mask option in advance settings, I do not see this option in the TFTPFileList component. I want to exclude all the "xml" files and files with certain substrings that I am transferring from my remote file system to Hbase. Is there a way I can do this without storing any files or scripts on my local computer through which Talend is running? I would appreciate any help asap!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307688#M79103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307689#M79104</link>
      <description>&lt;P&gt;By the way I have a large number of files of different formats, and so I would really like to exclude just the xml files then to include all the 100 other files with different formats.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 18:31:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307689#M79104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-21T18:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307690#M79105</link>
      <description>&lt;P&gt;One way of achieving this would be to use Java code to filter out the files which you don't want to process in your subsequent steps.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;Code for tJava -&lt;/P&gt; 
&lt;PRE&gt;String s = ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")).substring(StringHandling.INDEX( ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")),".")).trim();
if(!s.equals(".xml")){
System.out.println(s);
context.fileName = ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"));
globalMap.put("tFTPFileProperties_2_FILENAME", null);
}&lt;/PRE&gt; 
&lt;P&gt;The above could would make sure that the immediate next component of tJava (in my example (tFTPFileProperties) won't receive the any xml file as part of it's iteration.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Sample job flow -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFTP-2.JPG" style="width: 428px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lxzs.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144446i2FA7490447BD65AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lxzs.jpg" alt="0683p000009Lxzs.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFTPFileProperties settings -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFTP-3.JPG" style="width: 730px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lxs8.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135867iF59FC01857FB7C91/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lxs8.jpg" alt="0683p000009Lxs8.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307690#M79105</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-06-25T14:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307691#M79106</link>
      <description>&lt;P&gt;Thank You for your reply. I did figure it out by trial error. I guess I should have posted my solution earlier as well. I basically did the same as you illustrated in your response, however the only difference is: you did:&lt;/P&gt;&lt;PRE&gt;System.out.println(s);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;whereas I just:&lt;/P&gt;&lt;PRE&gt;continue;&lt;/PRE&gt;&lt;P&gt;as I did not want anything to print out. However, thank you for your response as this not only just confirms my trial and error method of excluding files but can help others in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307691#M79106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-25T14:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307692#M79107</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm having the same problem, of missing the Exluding Filemask in tFTPFileList, but this JavaCode is nog working for me..&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried it exactly the same as you put it, except that my next component is a tFTPGet, but all the files go through.. it doesn't stop the ones that should be excluded.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Am I doing something wrong?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I would like some more help here, cause I'm getting desperate with my job.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 15:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307692#M79107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-03T15:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307693#M79108</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Let us consider your TFTPFileList is named : "&lt;SPAN&gt;tFTPFileList_1"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So for example if I wanted to exclude all that ended with "xml", in my java component, I coded: if(((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")).endsWith(".xml")) {&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;or if I wanted to exclude all the files that begin with "sony", than in my java component, I coded:&lt;/P&gt; 
&lt;P&gt;if(((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")).startsWith("sony")) {&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This java component will be attached right after your TFTPFileList in order to disregard the files you do not want to pass into your FTPGet.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You will have to figure out a regex in java to parse/obtain the filenames of your files like the ones above (i.e. startsWith("") or contains(""), etc&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; to disregard the corresponding files you wish.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Next create a context variable named, say: filename&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Next, connect another java component to this first java component and input the following code:&lt;/P&gt; 
&lt;P&gt;context.filename = ((String)globalMap.get("&lt;SPAN&gt;tFTPFileList_1_CURRENT_FILE"));&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Now connect this to your TFTPGet component. Fill in the details of the local and remote directory of the TFTPGet Component. Finally, in your Filemask of TFTPGet component, add the context.filename as a "Files" parameter.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;This should get your desired files.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Aug 2018 00:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307693#M79108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-04T00:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude File Mask in TFTPFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307694#M79109</link>
      <description>Hi, 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Let us consider your TFTPFileList is named : "tFTPFileList_1" 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;So for example if I wanted to exclude all that ended with "xml", in my java component, I coded: if(((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")).endsWith(".xml")) { 
&lt;BR /&gt; 
&lt;BR /&gt;continue; 
&lt;BR /&gt; 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;or if I wanted to exclude all the files that begin with "sony", than in my java component, I coded: 
&lt;BR /&gt; 
&lt;BR /&gt;if(((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")).startsWith("sony")) { 
&lt;BR /&gt; 
&lt;BR /&gt;continue; 
&lt;BR /&gt; 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;This java component will be attached right after your TFTPFileList in order to disregard the files you do not want to pass into your FTPGet. 
&lt;BR /&gt; 
&lt;BR /&gt;You will have to figure out a regex in java to parse/obtain the filenames of your files like the ones above (i.e. startsWith("") or contains(""), etcSmiley Wink to disregard the corresponding files you wish. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Next create a context variable named, say: filename 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Next, connect another java component to this first java component and input the following code: 
&lt;BR /&gt; 
&lt;BR /&gt;context.filename = ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")); 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Now connect this to your TFTPGet component. Fill in the details of the local and remote directory of the TFTPGet Component. Finally, in your Filemask of TFTPGet component, add the context.filename as a "Files" parameter. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;This should get your desired files. 
&lt;BR /&gt; 
&lt;BR /&gt;Hope this helps!</description>
      <pubDate>Sat, 04 Aug 2018 00:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Exclude-File-Mask-in-TFTPFileList/m-p/2307694#M79109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-04T00:14:22Z</dc:date>
    </item>
  </channel>
</rss>

