<?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: Running same job multiple times for reading file from same folder in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268461#M47019</link>
    <description>Hi, &lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;if i run this job using two trunjob components,each tfilelist lists same files and both job will read same files but i want first job to read first file,and secondh job should read second file and etc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Could you please elaborate your scenario with an example with input and expected output values?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
    <pubDate>Mon, 28 Oct 2013 02:55:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-10-28T02:55:38Z</dc:date>
    <item>
      <title>Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268460#M47018</link>
      <description>hi,&lt;BR /&gt;I have a job which reads file from a folder and process it  and load into db.&lt;BR /&gt;tfilelist-----&amp;gt;iterate----&amp;gt;tfileinputdelimited-----&amp;gt;main-----&amp;gt;tmap-----&amp;gt;main------&amp;gt;tmysqloutputbulkexec&lt;BR /&gt;if i run this job using two trunjob components,each tfilelist lists same files and both job will read same files but i want first job to read first file,and secondh job should read second file and etc . How to achieve this scenario.</description>
      <pubDate>Fri, 25 Oct 2013 12:23:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268460#M47018</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-10-25T12:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268461#M47019</link>
      <description>Hi, &lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;if i run this job using two trunjob components,each tfilelist lists same files and both job will read same files but i want first job to read first file,and secondh job should read second file and etc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Could you please elaborate your scenario with an example with input and expected output values?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 28 Oct 2013 02:55:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268461#M47019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-28T02:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268462#M47020</link>
      <description>hi ,
&lt;BR /&gt;Consider i have one months data in a folder named January there are around 20,000 files i have a job which reads a file and does some transformation on some fields and loads it into database. I want the same job to run multiple times and each read different files and load to db. But the job which i have created reads all files and loads multiple times the same file if i run it multiple times. I don't want that to happen, same job running multiple times should read different files , so loading will be faster.</description>
      <pubDate>Mon, 28 Oct 2013 04:22:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268462#M47020</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-10-28T04:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268463#M47021</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;If jan folder has :&lt;BR /&gt;fille1&lt;BR /&gt;file2&lt;BR /&gt;file3&lt;BR /&gt;file4&lt;BR /&gt;file5&lt;BR /&gt;file6&lt;BR /&gt;so my job should run may be twice so one job should read file1, and second job should read file2 so on ..&lt;BR /&gt;so problem is since im using tfilelist on eac job they both list same files and process same file twice how to avoid it</description>
      <pubDate>Mon, 28 Oct 2013 05:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268463#M47021</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-10-28T05:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268464#M47022</link>
      <description>Hi banu 
&lt;BR /&gt;tFileList will list all the files in the specified folder and then iterate each file one by one whenever you run the job, in order to read a file again if it have been read and process, you can write the file name to a flag file that stores the file name of all processed file , and check the current file with the flag file to see if it have been processed, trigger the next action base on the result. For example: 
&lt;BR /&gt;tfilelist-----&amp;gt;iterate----&amp;gt;tFileInputDelimted_1-main--tJavaRow--runIf--tfileinputdelimited_2-----&amp;gt;main-----&amp;gt;tmap-----&amp;gt;main------&amp;gt;tmysqloutputbulkexec--oncomponentOK--tFixedFlowInput--main--tFileOutputDelimited 
&lt;BR /&gt;tFileInputDelimited_1: read all file name from the flag file. 
&lt;BR /&gt;on tJavaRow: compare the current file name with all file names read from the flag file. 
&lt;BR /&gt; 
&lt;PRE&gt;if((String)globalMap.get("tFileList_1_CURRENT_FILE").equals(input_row.filename)){&lt;BR /&gt;globalMap.put("hasBeenProcessed", true);&lt;BR /&gt;break;&lt;BR /&gt;}else{&lt;BR /&gt;globalMap.put("hasBeenProcessed", false);&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;set the condition of RunIf as: 
&lt;BR /&gt;!(Boolean)globalMap.get("hasBeenProcessed") 
&lt;BR /&gt;on tFixedFlowInput, generate the current file name, append it to the flag file with tFileOutputDelimited. 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 28 Oct 2013 05:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268464#M47022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-28T05:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268465#M47023</link>
      <description>hi shong, 
&lt;BR /&gt;Thank you for the reply , my doubt is if two jobs are acting on the same folder how can job1 know that job2 has processed the file2 and vice-versa 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 28 Oct 2013 05:30:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268465#M47023</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-10-28T05:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268466#M47024</link>
      <description>Hi 
&lt;BR /&gt;In my previous post, the example job shows it will check if the current file has been processed before processing it. 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 28 Oct 2013 05:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268466#M47024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-28T05:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268467#M47025</link>
      <description>hi shong, 
&lt;BR /&gt; 
&lt;BR /&gt;i m trying the solution u mentioned but getting error can u show the settings of tFileInputDelimted_1 component , 
&lt;BR /&gt;i have given file name/stream:"/opt/etl/fileflag.txt" and schema just :filename string 500</description>
      <pubDate>Mon, 28 Oct 2013 06:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268467#M47025</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-10-28T06:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268468#M47026</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;hi shong,&lt;BR /&gt;&lt;BR /&gt;i m trying the solution u mentioned but getting error can u show the settings of tFileInputDelimted_1 component ,&lt;BR /&gt;i have given file name/stream:"/opt/etl/fileflag.txt" and schema just :filename string 500&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;the error is cannot convert from boolean to string</description>
      <pubDate>Mon, 28 Oct 2013 06:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268468#M47026</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-10-28T06:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268469#M47027</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;i am also tried this scenario.but i got the error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cannot convert string to boolean&lt;/P&gt;
&lt;P&gt;but&lt;/P&gt;
&lt;P&gt;i changed .then also again shows the same error in tjavarow.&lt;/P&gt;
&lt;P&gt;how to resolve it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 09:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268469#M47027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-26T09:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Running same job multiple times for reading file from same folder</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268470#M47028</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;if its about parallel processing to make the process faster&lt;/P&gt;&lt;P&gt;then a simple workaround could be divide the files in two parts and change their names to some particular string so that you can&amp;nbsp; distinguish files of part one and two&lt;/P&gt;&lt;P&gt;and then use those particular strings as file mask in both the jobs respectively&lt;/P&gt;&lt;P&gt;in this way you can achieve the parallel processing.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 13:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-same-job-multiple-times-for-reading-file-from-same/m-p/2268470#M47028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-26T13:08:01Z</dc:date>
    </item>
  </channel>
</rss>

