<?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 Getting empty file created for tFileJSOnoutput using global_variable for constructing file name. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Getting-empty-file-created-for-tFileJSOnoutput-using-global/m-p/2259077#M40673</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="globalV.PNG" style="width: 696px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8oQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145298iC8164A44037FFE70/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8oQ.png" alt="0683p000009M8oQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="globalV1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8oV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131083i384DF1F131F37711/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8oV.png" alt="0683p000009M8oV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I have a question on the globalvariable. In my job I am using global variables to create filename. But I have seen that even if the result is going in the error flow, still creates empty files in the main flow&amp;nbsp;highlighted&amp;nbsp;in yellow&amp;nbsp;below. Can you please let me know how it can happen.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Jain&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:32:24 GMT</pubDate>
    <dc:creator>jain1</dc:creator>
    <dc:date>2024-11-16T03:32:24Z</dc:date>
    <item>
      <title>Getting empty file created for tFileJSOnoutput using global_variable for constructing file name.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Getting-empty-file-created-for-tFileJSOnoutput-using-global/m-p/2259077#M40673</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="globalV.PNG" style="width: 696px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8oQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145298iC8164A44037FFE70/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8oQ.png" alt="0683p000009M8oQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="globalV1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8oV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131083i384DF1F131F37711/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8oV.png" alt="0683p000009M8oV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I have a question on the globalvariable. In my job I am using global variables to create filename. But I have seen that even if the result is going in the error flow, still creates empty files in the main flow&amp;nbsp;highlighted&amp;nbsp;in yellow&amp;nbsp;below. Can you please let me know how it can happen.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Jain&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Getting-empty-file-created-for-tFileJSOnoutput-using-global/m-p/2259077#M40673</guid>
      <dc:creator>jain1</dc:creator>
      <dc:date>2024-11-16T03:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting empty file created for tFileJSOnoutput using global_variable for constructing file name.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Getting-empty-file-created-for-tFileJSOnoutput-using-global/m-p/2259078#M40674</link>
      <description>Hi 
&lt;BR /&gt;The tFileOutputXXX component always create the file in the beginning of the whole process of a subjob, there is an option 'don't create empty file' existing some file output component such as tFileOutputDelimited, but this option is not available yet. As a workaround, store the data into memory first, check the number of rows, if it is &amp;gt;, read the data from memory and write them to file. 
&lt;BR /&gt;eg: 
&lt;BR /&gt;....tJavaFlex_2--&amp;gt;tHashOutput 
&lt;BR /&gt;|runIf 
&lt;BR /&gt;tHashInput--main--tFileOutputJson 
&lt;BR /&gt; 
&lt;BR /&gt;on tJavaRlex: 
&lt;BR /&gt;in the begin part, define a counter variable 
&lt;BR /&gt;int counter=; 
&lt;BR /&gt; 
&lt;BR /&gt;in the main part: 
&lt;BR /&gt;counter++; 
&lt;BR /&gt; 
&lt;BR /&gt;in the end part: 
&lt;BR /&gt;globalMap.put("counter",counter) 
&lt;BR /&gt; 
&lt;BR /&gt;set the condition of runIf as: 
&lt;BR /&gt;(Integer)globalMap.get("counter")&amp;gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Hope it helps! 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 20 Jan 2020 02:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Getting-empty-file-created-for-tFileJSOnoutput-using-global/m-p/2259078#M40674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-20T02:50:12Z</dc:date>
    </item>
  </channel>
</rss>

