<?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: [resolved] [OutputFileComponent] Error occurs when rows is null in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289771#M63122</link>
    <description>Hi 
&lt;BR /&gt;You can check the number of rows before writing the data to file. For example 
&lt;BR /&gt;....main--tHashOutput-main-tJavaFlex 
&lt;BR /&gt;&amp;nbsp; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt;&amp;nbsp; | 
&lt;BR /&gt;tJava--runIf--tHashInput--main--tAdvancedFileOutputXML 
&lt;BR /&gt;in the begin part of tJavaFlex, define a counter with int type. 
&lt;BR /&gt;int counter=0; 
&lt;BR /&gt;in the main part: 
&lt;BR /&gt;counter=counter+1; 
&lt;BR /&gt;in the end part, store the counter to a global variable 
&lt;BR /&gt;globalMap.put("counter",counter); 
&lt;BR /&gt; 
&lt;BR /&gt;on tJava, get the row number and check if greater than 0. 
&lt;BR /&gt;int counter= (Integer)globalMap.get("counter"); 
&lt;BR /&gt;if(counter&amp;gt;0){ 
&lt;BR /&gt;globalMap.put("hasData",true); 
&lt;BR /&gt;}else{ 
&lt;BR /&gt;globalMap.put("hasData",false); 
&lt;BR /&gt;} 
&lt;BR /&gt;Set the condition of runIf link as: 
&lt;BR /&gt;(Boolean)globalMap.get("hasData") 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Thu, 10 Sep 2015 05:22:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-10T05:22:59Z</dc:date>
    <item>
      <title>[resolved] [OutputFileComponent] Error occurs when rows is null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289770#M63121</link>
      <description>&lt;P&gt;Hello. For my process, my mapping component return no rows. This case can be happen with our datas.&lt;BR /&gt;How can i stop the process to don't have this error, ingore this error, or better, can i define settings for the tAdvanceFileOutputXML to not trying to generate a file with null or no rows input.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I set only to true for my component the settings :&lt;BR /&gt;[list=*]&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;Do not generate empty file&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;Create directory if does not exist&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#ff3333"&gt;Exception in component tAdvancedFileOutputXML_1&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#ff3333"&gt;java.lang.NullPointerException&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A href="https://community.talend.com/legacyfs/online/316269/blob_20150909-1108.png" target="_blank" rel="noopener"&gt;https://www.talendforge.org/forum/img/members/316269/blob_20150909-1108.png&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#2365b0"&gt;&lt;STRONG&gt;&lt;A href="https://community.talend.com/legacyfs/online/316269/blob_20150909-1112.png" target="_blank"&gt;https://www.talendforge.org/forum/img/members/316269/blob_20150909-1112.png&lt;/A&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2015 10:16:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289770#M63121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-09T10:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] [OutputFileComponent] Error occurs when rows is null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289771#M63122</link>
      <description>Hi 
&lt;BR /&gt;You can check the number of rows before writing the data to file. For example 
&lt;BR /&gt;....main--tHashOutput-main-tJavaFlex 
&lt;BR /&gt;&amp;nbsp; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt;&amp;nbsp; | 
&lt;BR /&gt;tJava--runIf--tHashInput--main--tAdvancedFileOutputXML 
&lt;BR /&gt;in the begin part of tJavaFlex, define a counter with int type. 
&lt;BR /&gt;int counter=0; 
&lt;BR /&gt;in the main part: 
&lt;BR /&gt;counter=counter+1; 
&lt;BR /&gt;in the end part, store the counter to a global variable 
&lt;BR /&gt;globalMap.put("counter",counter); 
&lt;BR /&gt; 
&lt;BR /&gt;on tJava, get the row number and check if greater than 0. 
&lt;BR /&gt;int counter= (Integer)globalMap.get("counter"); 
&lt;BR /&gt;if(counter&amp;gt;0){ 
&lt;BR /&gt;globalMap.put("hasData",true); 
&lt;BR /&gt;}else{ 
&lt;BR /&gt;globalMap.put("hasData",false); 
&lt;BR /&gt;} 
&lt;BR /&gt;Set the condition of runIf link as: 
&lt;BR /&gt;(Boolean)globalMap.get("hasData") 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 10 Sep 2015 05:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289771#M63122</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-10T05:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] [OutputFileComponent] Error occurs when rows is null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289772#M63123</link>
      <description>I work with TOS for ESB 6.1.0.20150815_15_15-M1.&lt;BR /&gt;I have not these component tHashInput, tHashOutput and tJavaFlex :s&lt;BR /&gt;I try too to attach the tJava-RunIf on many component, but he don't want. On which component can i link the RunIf ?</description>
      <pubDate>Thu, 10 Sep 2015 10:15:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289772#M63123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-10T10:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] [OutputFileComponent] Error occurs when rows is null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289773#M63124</link>
      <description>Hi
&lt;BR /&gt;Take a look at this 
&lt;A href="https://help.talend.com/pages/viewpage.action?pageId=190054401" target="_blank" rel="nofollow noopener noreferrer"&gt;article&lt;/A&gt; to learn how to active these technical components (tHashInput and tHashOutput). tJavaFlex should be available by default, I don't understand why you can't find it.
&lt;BR /&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 10 Sep 2015 12:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289773#M63124</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-10T12:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] [OutputFileComponent] Error occurs when rows is null</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289774#M63125</link>
      <description>Oups, i have the tJavaFlex but it does not appear when i write his name. I must take it from tools.
&lt;BR /&gt;For next, all work fine.
&lt;BR /&gt;
&lt;BR /&gt;Thanks for the help.
&lt;BR /&gt;In our project, not only developpers will used Talend. If i can give a suggestion, it will be great if Talend improve a component for counting number of row to avoid us writing java code.</description>
      <pubDate>Thu, 10 Sep 2015 13:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-OutputFileComponent-Error-occurs-when-rows-is-null/m-p/2289774#M63125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-10T13:40:27Z</dc:date>
    </item>
  </channel>
</rss>

