<?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 tFileList does not clean his global variables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232129#M22204</link>
    <description>&lt;P&gt;Scenario: a loop on dates (for example) and within any iteration a tFileList component look for specific files.&lt;/P&gt; 
&lt;P&gt;Well, when the component does not find any file, the global variables (in particular&amp;nbsp;tFileList_2_CURRENT_FILEPATH) are not cleaned.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;the bold line you see below is a:&lt;/P&gt; 
&lt;P&gt;System.out.println(globalMap.get("tFileList_2_CURRENT_FILEPATH"));&lt;/P&gt; 
&lt;P&gt;performed by a tJava component which follows the tFileList component itself.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;[DEBUG]: xxxxx - tFileList_2 - Start to work.&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Parameters&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;IRECTORY = context.transport_archive_dir+((String)globalMap.get("application_key"))+".log.archived/" | LIST_MODE = FILES | INCLUDSUBDIR = false | CASE_SENSITIVE = YES | ERROR = false | GLOBEXPRESSIONS = true | FILES = [{FILEMASK=((String)globalMap.get("application_key"))+".log."+(new SimpleDateFormat("yyyy-MM-dd")).format(globalMap.get("date"))+".gz"}] | ORDER_BY_NOTHING = true | ORDER_BY_FILENAME = false | ORDER_BY_FILESIZE = false | ORDER_BY_MODIFIEDDATE = false | ORDER_ACTION_ASC = true | ORDER_ACTION_DESC = false | IFEXCLUDE = false | FORMAT_FILEPATH_TO_SLASH = false |&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Start to list files&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Current file or directory path : /apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-11.gz&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - &lt;STRONG&gt;File or directory count : 1&lt;/STRONG&gt;&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Done.&lt;BR /&gt;&lt;STRONG&gt;/apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-11.gz&lt;/STRONG&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Start to work.&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Parameters&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;IRECTORY = context.transport_archive_dir+((String)globalMap.get("application_key"))+".log.archived/" | LIST_MODE = FILES | INCLUDSUBDIR = false | CASE_SENSITIVE = YES | ERROR = false | GLOBEXPRESSIONS = true | FILES = [{FILEMASK=((String)globalMap.get("application_key"))+".log."+(new SimpleDateFormat("yyyy-MM-dd")).format(globalMap.get("date"))+".gz"}] | ORDER_BY_NOTHING = true | ORDER_BY_FILENAME = false | ORDER_BY_FILESIZE = false | ORDER_BY_MODIFIEDDATE = false | ORDER_ACTION_ASC = true | ORDER_ACTION_DESC = false | IFEXCLUDE = false | FORMAT_FILEPATH_TO_SLASH = false |&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Start to list files&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Current file or directory path : /apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-12.gz&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - &lt;STRONG&gt;File or directory count : 1&lt;/STRONG&gt;&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Done.&lt;BR /&gt;&lt;STRONG&gt;/apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-12.gz&lt;/STRONG&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Start to work.&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Parameters&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;IRECTORY = context.transport_archive_dir+((String)globalMap.get("application_key"))+".log.archived/" | LIST_MODE = FILES | INCLUDSUBDIR = false | CASE_SENSITIVE = YES | ERROR = false | GLOBEXPRESSIONS = true | FILES = [{FILEMASK=((String)globalMap.get("application_key"))+".log."+(new SimpleDateFormat("yyyy-MM-dd")).format(globalMap.get("date"))+".gz"}] | ORDER_BY_NOTHING = true | ORDER_BY_FILENAME = false | ORDER_BY_FILESIZE = false | ORDER_BY_MODIFIEDDATE = false | ORDER_ACTION_ASC = true | ORDER_ACTION_DESC = false | IFEXCLUDE = false | FORMAT_FILEPATH_TO_SLASH = false |&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Start to list files&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - &lt;STRONG&gt;File or directory count : 0&lt;/STRONG&gt;&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Done.&lt;BR /&gt;&lt;STRONG&gt;/apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-12.gz&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I can check also for&amp;nbsp;&amp;nbsp;((Integer)globalMap.get("tFileList_2_NB_FILE"))&amp;nbsp; of course, but I was expecting to have the global variable set by the component cleaned before any of its execution.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Dec 2018 14:04:52 GMT</pubDate>
    <dc:creator>Lorenzo5</dc:creator>
    <dc:date>2018-12-13T14:04:52Z</dc:date>
    <item>
      <title>tFileList does not clean his global variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232129#M22204</link>
      <description>&lt;P&gt;Scenario: a loop on dates (for example) and within any iteration a tFileList component look for specific files.&lt;/P&gt; 
&lt;P&gt;Well, when the component does not find any file, the global variables (in particular&amp;nbsp;tFileList_2_CURRENT_FILEPATH) are not cleaned.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;the bold line you see below is a:&lt;/P&gt; 
&lt;P&gt;System.out.println(globalMap.get("tFileList_2_CURRENT_FILEPATH"));&lt;/P&gt; 
&lt;P&gt;performed by a tJava component which follows the tFileList component itself.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;[DEBUG]: xxxxx - tFileList_2 - Start to work.&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Parameters&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;IRECTORY = context.transport_archive_dir+((String)globalMap.get("application_key"))+".log.archived/" | LIST_MODE = FILES | INCLUDSUBDIR = false | CASE_SENSITIVE = YES | ERROR = false | GLOBEXPRESSIONS = true | FILES = [{FILEMASK=((String)globalMap.get("application_key"))+".log."+(new SimpleDateFormat("yyyy-MM-dd")).format(globalMap.get("date"))+".gz"}] | ORDER_BY_NOTHING = true | ORDER_BY_FILENAME = false | ORDER_BY_FILESIZE = false | ORDER_BY_MODIFIEDDATE = false | ORDER_ACTION_ASC = true | ORDER_ACTION_DESC = false | IFEXCLUDE = false | FORMAT_FILEPATH_TO_SLASH = false |&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Start to list files&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Current file or directory path : /apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-11.gz&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - &lt;STRONG&gt;File or directory count : 1&lt;/STRONG&gt;&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Done.&lt;BR /&gt;&lt;STRONG&gt;/apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-11.gz&lt;/STRONG&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Start to work.&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Parameters&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;IRECTORY = context.transport_archive_dir+((String)globalMap.get("application_key"))+".log.archived/" | LIST_MODE = FILES | INCLUDSUBDIR = false | CASE_SENSITIVE = YES | ERROR = false | GLOBEXPRESSIONS = true | FILES = [{FILEMASK=((String)globalMap.get("application_key"))+".log."+(new SimpleDateFormat("yyyy-MM-dd")).format(globalMap.get("date"))+".gz"}] | ORDER_BY_NOTHING = true | ORDER_BY_FILENAME = false | ORDER_BY_FILESIZE = false | ORDER_BY_MODIFIEDDATE = false | ORDER_ACTION_ASC = true | ORDER_ACTION_DESC = false | IFEXCLUDE = false | FORMAT_FILEPATH_TO_SLASH = false |&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Start to list files&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Current file or directory path : /apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-12.gz&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - &lt;STRONG&gt;File or directory count : 1&lt;/STRONG&gt;&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Done.&lt;BR /&gt;&lt;STRONG&gt;/apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-12.gz&lt;/STRONG&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Start to work.&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Parameters&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;IRECTORY = context.transport_archive_dir+((String)globalMap.get("application_key"))+".log.archived/" | LIST_MODE = FILES | INCLUDSUBDIR = false | CASE_SENSITIVE = YES | ERROR = false | GLOBEXPRESSIONS = true | FILES = [{FILEMASK=((String)globalMap.get("application_key"))+".log."+(new SimpleDateFormat("yyyy-MM-dd")).format(globalMap.get("date"))+".gz"}] | ORDER_BY_NOTHING = true | ORDER_BY_FILENAME = false | ORDER_BY_FILESIZE = false | ORDER_BY_MODIFIEDDATE = false | ORDER_ACTION_ASC = true | ORDER_ACTION_DESC = false | IFEXCLUDE = false | FORMAT_FILEPATH_TO_SLASH = false |&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - Start to list files&lt;BR /&gt;[INFO ]: xxxxx - tFileList_2 - &lt;STRONG&gt;File or directory count : 0&lt;/STRONG&gt;&lt;BR /&gt;[DEBUG]: xxxxx - tFileList_2 - Done.&lt;BR /&gt;&lt;STRONG&gt;/apploghost_pri-archive/syslog-ng/archive/var/syslog-ng/PROGRAMS/TRANSPORT/TPMBG-APP40.log.archived/TPMBG-APP40.log.2018-12-12.gz&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I can check also for&amp;nbsp;&amp;nbsp;((Integer)globalMap.get("tFileList_2_NB_FILE"))&amp;nbsp; of course, but I was expecting to have the global variable set by the component cleaned before any of its execution.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 14:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232129#M22204</guid>
      <dc:creator>Lorenzo5</dc:creator>
      <dc:date>2018-12-13T14:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: tFileList does not clean his global variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232130#M22205</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Could you please share a screen shot of your job and component detail screenshot so that we will get a better idea about the use case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 14:57:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232130#M22205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-13T14:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: tFileList does not clean his global variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232131#M22206</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="job.png" style="width: 821px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1gB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137882iF2F03E555A320B1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1gB.png" alt="0683p000009M1gB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 09:15:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232131#M22206</guid>
      <dc:creator>Lorenzo5</dc:creator>
      <dc:date>2018-12-14T09:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: tFileList does not clean his global variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232132#M22207</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/null"&gt;@lorenzolucioni&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the diagram and I got a better idea of your problem.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You are using OnSubJobOk and OnComponentOk after getting the data from filter and we may not get the desired way of data flow here.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Instead, can we break the flow to two simple flows here? Following are the steps to do it.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;a) After tfilterrow, push the output data to a tHashOutput&lt;/P&gt; 
&lt;P&gt;b) To execute the plain logs, use the below components.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;tHashInput (from previous stage output) -&amp;gt; tFlowtoIterate -&amp;gt; tFlisList ---- (if)----- &amp;gt; tRunJob Child&lt;/P&gt; 
&lt;P&gt;c) Again read the same hash to execute the gZipped logs&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;tHashInput (from previous stage output) -&amp;gt; tFlowtoIterate -&amp;gt; tFlisList ---- (if)----- &amp;gt; tRunJob Child&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; This time, mark the option to clear the hash after reading .&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;I believe, it should resolve your issue. If it has helped in issue resolution, could you please mark the topic as resolved? Kudos are also welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Warm Regards,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Nikhil Thampi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 15:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileList-does-not-clean-his-global-variables/m-p/2232132#M22207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-16T15:59:05Z</dc:date>
    </item>
  </channel>
</rss>

