<?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 Value from subjob in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Value-from-subjob/m-p/2364927#M128607</link>
    <description>&lt;P&gt;I'm trying to pass/store a value from one subjob to be used in another subjob, and am trying to find the best way.&amp;nbsp;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried to implement what is described in the below post (pass a Map to the subjob as a context parameter) but ran into unexpected results.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://www.talendbyexample.com/talend-returning-values-from-subjobs.html" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://www.talendbyexample.com/talend-returning-values-from-subjobs.html&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The issue I run into is in the subjob I'm unable to retrieve the context parameter as a &lt;STRONG&gt;Map.&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;When I check the class of context param it is showing it as &lt;EM&gt;java.lang.String&lt;/EM&gt; instead of java.util.concurrent.ConcurrentHashMap.&amp;nbsp; If I use a ContextDump -&amp;gt; LogRow the output seems to indicate it's a Map&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Context Parameter Setup&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;sharedMap (&lt;EM&gt;Object&lt;/EM&gt;)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;ParentJob&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;tJava&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;context.sharedMap = new java.util.concurrent.ConcurrentHashMap();&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;sharedMap.getClass().getName()&lt;/STRONG&gt;&amp;nbsp;= &lt;EM&gt;java.util.concurrent.ConcurrentHashMap&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;SubJob&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;Options&lt;/EM&gt;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;Use independent process&lt;/LI&gt; 
 &lt;LI&gt;Transmit whole context&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;STRONG&gt;sharedMap.getClass().getName() =&lt;/STRONG&gt; &lt;EM&gt;java.lang.String&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ContextDump -&amp;gt; LogRow results indicate the value appears to be a Map&lt;/P&gt; 
&lt;PRE&gt;|sharedMap         |{parentJob=parentJob value}                        |&amp;nbsp;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Follow-up questions:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;* Why does the &lt;STRONG&gt;Object&lt;/STRONG&gt; context param get converted to &lt;STRONG&gt;String&lt;/STRONG&gt; when passed to the subjob?&lt;/P&gt; 
&lt;P&gt;* Is there a different/better way I should be handling what I'm trying to do?&amp;nbsp; I can't store the value in a globalMap because the globalMap only applies to the job being run.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 02:29:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-06-12T02:29:28Z</dc:date>
    <item>
      <title>Value from subjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Value-from-subjob/m-p/2364927#M128607</link>
      <description>&lt;P&gt;I'm trying to pass/store a value from one subjob to be used in another subjob, and am trying to find the best way.&amp;nbsp;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried to implement what is described in the below post (pass a Map to the subjob as a context parameter) but ran into unexpected results.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://www.talendbyexample.com/talend-returning-values-from-subjobs.html" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://www.talendbyexample.com/talend-returning-values-from-subjobs.html&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The issue I run into is in the subjob I'm unable to retrieve the context parameter as a &lt;STRONG&gt;Map.&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;When I check the class of context param it is showing it as &lt;EM&gt;java.lang.String&lt;/EM&gt; instead of java.util.concurrent.ConcurrentHashMap.&amp;nbsp; If I use a ContextDump -&amp;gt; LogRow the output seems to indicate it's a Map&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Context Parameter Setup&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;sharedMap (&lt;EM&gt;Object&lt;/EM&gt;)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;ParentJob&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;tJava&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;context.sharedMap = new java.util.concurrent.ConcurrentHashMap();&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;sharedMap.getClass().getName()&lt;/STRONG&gt;&amp;nbsp;= &lt;EM&gt;java.util.concurrent.ConcurrentHashMap&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;SubJob&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;Options&lt;/EM&gt;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;Use independent process&lt;/LI&gt; 
 &lt;LI&gt;Transmit whole context&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;STRONG&gt;sharedMap.getClass().getName() =&lt;/STRONG&gt; &lt;EM&gt;java.lang.String&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ContextDump -&amp;gt; LogRow results indicate the value appears to be a Map&lt;/P&gt; 
&lt;PRE&gt;|sharedMap         |{parentJob=parentJob value}                        |&amp;nbsp;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Follow-up questions:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;* Why does the &lt;STRONG&gt;Object&lt;/STRONG&gt; context param get converted to &lt;STRONG&gt;String&lt;/STRONG&gt; when passed to the subjob?&lt;/P&gt; 
&lt;P&gt;* Is there a different/better way I should be handling what I'm trying to do?&amp;nbsp; I can't store the value in a globalMap because the globalMap only applies to the job being run.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 02:29:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Value-from-subjob/m-p/2364927#M128607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-12T02:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Value from subjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Value-from-subjob/m-p/2364928#M128608</link>
      <description>you can use tbufferoutput.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Jun 2019 09:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Value-from-subjob/m-p/2364928#M128608</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2019-06-12T09:03:53Z</dc:date>
    </item>
  </channel>
</rss>

