<?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: tBufferOutput reset when runjob is finished in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373077#M135839</link>
    <description>Maybe it's a little too late to answer but it could help other people which came on the forum. 
&lt;BR /&gt;to clear the buffer you can place a tJava on your job and write into "globalBuffer.clear()". 
&lt;BR /&gt;It could more easy to use than importing developed componant. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Fri, 26 Aug 2011 09:44:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-08-26T09:44:17Z</dc:date>
    <item>
      <title>tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373075#M135837</link>
      <description>Hello all,
&lt;BR /&gt;I have a main job which calls many child jobs. For each child job which ended normally, I add a line to a tBufferOutput to tell which one went OK.
&lt;BR /&gt;The Talend job class is loaded with Spring in a Map, as a singleton bean (one process can call many jobs, listed in that Map). So, each time I run the job, it is the same instance (not the child jobs as the parent job instantiates them when needed).
&lt;BR /&gt;My problem is that form the second time I call the job, it also returns the entries I added during the previous call(s) in the tBufferOutput.
&lt;BR /&gt;I think this is 'normal' as I use it as a singleton, but it is well a bug for me. 
&lt;BR /&gt;Here is the runjob method when a tBufferOutput is added to the job :
&lt;BR /&gt;
&lt;PRE&gt;	public final java.util.List&amp;lt;String[]&amp;gt; globalBuffer = new java.util.ArrayList&amp;lt;String[]&amp;gt;();&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;	public String[][] runJob(String[] args) {&lt;BR /&gt;		int exitCode = runJobInTOS(args);&lt;BR /&gt;		String[][] bufferValue = (String[][]) globalBuffer.toArray(new String[]);&lt;BR /&gt;		return bufferValue;&lt;BR /&gt;	}&lt;/PRE&gt;
&lt;BR /&gt;The cleanest way would be to clear the globalBuffer as soon as it is copied to 'bufferValue'.
&lt;BR /&gt;What do you think?
&lt;BR /&gt;Cheers,</description>
      <pubDate>Sat, 16 Nov 2024 13:39:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373075#M135837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373076#M135838</link>
      <description>I noticed this problem a little time ago, and created a component to solve it :&lt;BR /&gt;&lt;A href="http://www.talendforge.org/exchange/tos/extension_view.php?eid=152" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/exchange/tos/extension_view.php?eid=152&lt;/A&gt;&lt;BR /&gt;This component is a fork of "tBufferOutput" with an option to clear the buffer before using it.</description>
      <pubDate>Tue, 08 Dec 2009 13:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373076#M135838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-08T13:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373077#M135839</link>
      <description>Maybe it's a little too late to answer but it could help other people which came on the forum. 
&lt;BR /&gt;to clear the buffer you can place a tJava on your job and write into "globalBuffer.clear()". 
&lt;BR /&gt;It could more easy to use than importing developed componant. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 26 Aug 2011 09:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373077#M135839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-26T09:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373078#M135840</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Maybe it's a little too late to answer but it could help other people which came on the forum.&lt;BR /&gt;to clear the buffer you can place a tJava on your job and write into "globalBuffer.clear()".&lt;BR /&gt;It could more easy to use than importing developed componant. &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi 
&lt;BR /&gt;Good tip! Thank you~ 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 26 Aug 2011 10:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373078#M135840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-26T10:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373079#M135841</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Maybe it's a little too late to answer but it could help other people which came on the forum.&lt;BR /&gt;to clear the buffer you can place a tJava on your job and write into "globalBuffer.clear()".&lt;BR /&gt;It could more easy to use than importing developed componant. &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Thanks. That has really helped.</description>
      <pubDate>Fri, 22 Jun 2012 10:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373079#M135841</guid>
      <dc:creator>josephmundadan</dc:creator>
      <dc:date>2012-06-22T10:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373080#M135842</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Maybe it's a little too late to answer but it could help other people which came on the forum.&lt;BR /&gt;to clear the buffer you can place a tJava on your job and write into "globalBuffer.clear()".&lt;BR /&gt;It could more easy to use than importing developed componant. &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Thanks! Thats really helpfull 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; You could also use tHashOutputs like this if you were planning on linking more than one tBufferOutput to a tBufferInput: 
&lt;BR /&gt;---&amp;gt; tHashOutput1 (append off) ---&amp;gt; tHashInput1 \ 
&lt;BR /&gt; --&amp;gt; tUnite1 --&amp;gt; rest of job 
&lt;BR /&gt;---&amp;gt; tHashOutput2 (append off) ---&amp;gt; tHashInput2 / 
&lt;BR /&gt;Although theres no need to do this if you use Dolans suggestion 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 21 Aug 2013 09:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373080#M135842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-21T09:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: tBufferOutput reset when runjob is finished</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373081#M135843</link>
      <description>Thank you!</description>
      <pubDate>Mon, 11 Nov 2019 18:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tBufferOutput-reset-when-runjob-is-finished/m-p/2373081#M135843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-11T18:17:45Z</dc:date>
    </item>
  </channel>
</rss>

