<?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: tWaiForFile - Is it possible to specify more than 1 file to wait? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198315#M1698</link>
    <description>Hello 
&lt;BR /&gt;Set the filemask as "*.tap.asc", get the filename on tJava and compare it with a list of files which you want to extract, if true, do next transaction. eg: 
&lt;BR /&gt;tJava_1 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tWaitForFile_1--iterate--&amp;gt;tJava_2-runIf-&amp;gt;tFileInputDelimited_1--main--&amp;gt;tLogRow 
&lt;BR /&gt;On tJava_1: define a list of files which you want to extract eg: 
&lt;BR /&gt; 
&lt;PRE&gt;java.util.List&amp;lt;String&amp;gt; list=new java.util.ArrayList&amp;lt;String&amp;gt;();&lt;BR /&gt;list.add("bug1126.abc.txt");&lt;BR /&gt;list.add("sampleb.tap.asc");&lt;BR /&gt;globalMap.put("mylist",list);&lt;/PRE&gt; 
&lt;BR /&gt;on tJava_2 
&lt;BR /&gt; 
&lt;PRE&gt;boolean condition=false;&lt;BR /&gt;java.util.List&amp;lt;String&amp;gt; list1=(java.util.List&amp;lt;String&amp;gt;)globalMap.get("mylist");&lt;BR /&gt;String filename =((String)globalMap.get("tWaitForFile_1_FILENAME"));&lt;BR /&gt;for(int i=0;i&amp;lt;list1.size();i++){&lt;BR /&gt; if(filename.equals(list1.get(i))){&lt;BR /&gt;   condition=true;&lt;BR /&gt;   break;&lt;BR /&gt;   }&lt;BR /&gt;   }&lt;BR /&gt;   &lt;BR /&gt;   globalMap.put("condition",condition);&lt;/PRE&gt; 
&lt;BR /&gt;runIf condition: 
&lt;BR /&gt; 
&lt;PRE&gt;(Boolean)globalMap.get("condition")&lt;/PRE&gt; 
&lt;BR /&gt;set the file name of tFileInputDelimited_1: 
&lt;BR /&gt;(String)globalMap.get("tWaitForFile_1_CREATED_FILE") 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Fri, 31 Dec 2010 03:44:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-12-31T03:44:01Z</dc:date>
    <item>
      <title>tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198310#M1693</link>
      <description>Hello,&lt;BR /&gt;I have about 10 files which I need to wait in order to begin processing.  How can I do this with tWaitForFile?  Where can I put the names of the files that I need to wait?  Please help.&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Sat, 16 Nov 2024 13:09:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198310#M1693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198311#M1694</link>
      <description>Hello 
&lt;BR /&gt;Select a directory and set the file mask, please read the user documenation, there is a demo job. 
&lt;BR /&gt;Let's us if you have any trouble. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 30 Dec 2010 05:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198311#M1694</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-30T05:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198312#M1695</link>
      <description>Thank you for your reply Shong. Can you please show me how I can configure the tWaitForFile for these specific file names in a directory?
&lt;BR /&gt;These are the only file names I need out of all other files with same extension .tap.asc in a directory:
&lt;BR /&gt;samplea.tap.asc
&lt;BR /&gt;sampleb.tap.asc
&lt;BR /&gt;samplec.tap.asc
&lt;BR /&gt;sampled.tap.asc
&lt;BR /&gt;samplee.tap.asc
&lt;BR /&gt;samplef.tap.asc
&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 30 Dec 2010 13:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198312#M1695</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-30T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198313#M1696</link>
      <description>Can you try this in filemask property --&amp;gt; sample*.tap.asc</description>
      <pubDate>Thu, 30 Dec 2010 14:00:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198313#M1696</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-30T14:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198314#M1697</link>
      <description>there will be sampleg.tap.asc, sampleh.tap.asc, etc.. which I do not need to wait.  Is it possible to specify the exact names of files to wait in the filemask property?  I tried with a comma after each file name and did not work.&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 30 Dec 2010 14:20:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198314#M1697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-30T14:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198315#M1698</link>
      <description>Hello 
&lt;BR /&gt;Set the filemask as "*.tap.asc", get the filename on tJava and compare it with a list of files which you want to extract, if true, do next transaction. eg: 
&lt;BR /&gt;tJava_1 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tWaitForFile_1--iterate--&amp;gt;tJava_2-runIf-&amp;gt;tFileInputDelimited_1--main--&amp;gt;tLogRow 
&lt;BR /&gt;On tJava_1: define a list of files which you want to extract eg: 
&lt;BR /&gt; 
&lt;PRE&gt;java.util.List&amp;lt;String&amp;gt; list=new java.util.ArrayList&amp;lt;String&amp;gt;();&lt;BR /&gt;list.add("bug1126.abc.txt");&lt;BR /&gt;list.add("sampleb.tap.asc");&lt;BR /&gt;globalMap.put("mylist",list);&lt;/PRE&gt; 
&lt;BR /&gt;on tJava_2 
&lt;BR /&gt; 
&lt;PRE&gt;boolean condition=false;&lt;BR /&gt;java.util.List&amp;lt;String&amp;gt; list1=(java.util.List&amp;lt;String&amp;gt;)globalMap.get("mylist");&lt;BR /&gt;String filename =((String)globalMap.get("tWaitForFile_1_FILENAME"));&lt;BR /&gt;for(int i=0;i&amp;lt;list1.size();i++){&lt;BR /&gt; if(filename.equals(list1.get(i))){&lt;BR /&gt;   condition=true;&lt;BR /&gt;   break;&lt;BR /&gt;   }&lt;BR /&gt;   }&lt;BR /&gt;   &lt;BR /&gt;   globalMap.put("condition",condition);&lt;/PRE&gt; 
&lt;BR /&gt;runIf condition: 
&lt;BR /&gt; 
&lt;PRE&gt;(Boolean)globalMap.get("condition")&lt;/PRE&gt; 
&lt;BR /&gt;set the file name of tFileInputDelimited_1: 
&lt;BR /&gt;(String)globalMap.get("tWaitForFile_1_CREATED_FILE") 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 31 Dec 2010 03:44:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198315#M1698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-31T03:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198316#M1699</link>
      <description>I did exactly as you showed above but kept getting error at tFileInputDelimited_1 connecting to socket on port 3590
&lt;BR /&gt;Exception in component tFileInputDelimited_1
&lt;BR /&gt;java.lang.NullPointerException
&lt;BR /&gt;I set the file name of tFileInputDelimited_1:
&lt;BR /&gt;(String)globalMap.get("tWaitForFile_1_CREATED_FILE")
&lt;BR /&gt;I don't know much about java and could not figure out what's wrong. Please advise.</description>
      <pubDate>Fri, 31 Dec 2010 07:50:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198316#M1699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-31T07:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198317#M1700</link>
      <description>Hello 
&lt;BR /&gt;First, make sure there is a component labeled tWaitForFile_1 in your job. 
&lt;BR /&gt;Second, print the global variable and see if it is null or not.
&lt;BR /&gt;tJava_1
&lt;BR /&gt; |
&lt;BR /&gt;onsubjobok
&lt;BR /&gt; |
&lt;BR /&gt;tWaitForFile_1--iterate--&amp;gt;tJava_2-runIf-&amp;gt;tJava_3
&lt;BR /&gt;on tJava_3:
&lt;BR /&gt;System.out.println((String)globalMap.get("tWaitForFile_1_CREATED_FILE"));
&lt;BR /&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 31 Dec 2010 08:00:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198317#M1700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-31T08:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: tWaiForFile - Is it possible to specify more than 1 file to wait?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198318#M1701</link>
      <description>1 more question Shong, how can I make it wait and not to do anything until all the specified file names arrive? 
&lt;BR /&gt;For example, I need all these file names bug1126.abc.txt, sampleb.tap.asc and samplec.tap.asc to be present in a directory before they get copied to a different folder for processing. If one of the listed files is missing, then it needs to wait until all show up in order to move on to next processing step. 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 31 Dec 2010 16:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWaiForFile-Is-it-possible-to-specify-more-than-1-file-to-wait/m-p/2198318#M1701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-31T16:30:54Z</dc:date>
    </item>
  </channel>
</rss>

