<?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: tsetGlobalVar in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203313#M4682</link>
    <description>toracleinput-&amp;gt;tjavarow -onsubjobok-&amp;gt; trunjob (job1) -onsubjobok-&amp;gt; trunjob (job2). 
&lt;BR /&gt;Job1 and Job2 would just be toracleinput -&amp;gt;tmap-&amp;gt;toracleoutput. 
&lt;BR /&gt;The above works 
&lt;BR /&gt;if I create JOB0 as toracleinput-&amp;gt;tjavarow 
&lt;BR /&gt;and then create separate master job as below with Transmit whole context" checked it does not pass the value 
&lt;BR /&gt;WHY? 
&lt;BR /&gt; trunjob (job0)-&amp;gt;onsubjobok-&amp;gt; trunjob (job1) -onsubjobok-&amp;gt; trunjob (job2).</description>
    <pubDate>Tue, 31 Jul 2012 17:51:48 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2012-07-31T17:51:48Z</dc:date>
    <item>
      <title>tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203309#M4678</link>
      <description>here's my job&lt;BR /&gt;toracleinput-&amp;gt;tsetGlobalVar (key - rundate  values "row1.rundate")&lt;BR /&gt;I need to use the "rundate" from the tsetGlobalVar in all my other jobs. &lt;BR /&gt;How to do this?</description>
      <pubDate>Mon, 30 Jul 2012 22:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203309#M4678</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-07-30T22:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203310#M4679</link>
      <description>Assuming row1.rundate is a Date then use (Date)globalMap.get("rundate"). 
&lt;BR /&gt;However, you can't use globalMap variables from one job in other jobs. You would need to store the rundate as a context variable instead. Replace tSetGlobalVar with tJavaRow and use a statement like context.rundate = row1.rundate;. The check "Transmit whole context" on tRunJob.</description>
      <pubDate>Tue, 31 Jul 2012 00:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203310#M4679</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-07-31T00:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203311#M4680</link>
      <description>I added context.rundate to my existing context file 
&lt;BR /&gt;here's my job 
&lt;BR /&gt;toracleinput-&amp;gt;tjavarow(context.rundate = row1.rundate 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I tested this job and it works fine. 
&lt;BR /&gt;I did not understand " The check "Transmit whole context" on tRunJob." 
&lt;BR /&gt;Do I need to add this job as trunjob in all the child jobs that need rundate or is there a better way to do this ? like below 
&lt;BR /&gt;JOB_1 
&lt;BR /&gt;trunjob -&amp;gt;onsubjobok -&amp;gt;toracleinput -&amp;gt;tmap-&amp;gt;toracleoutput 
&lt;BR /&gt;in toracleinput my query would be "select * from tablename where co_date&amp;gt;context.rundate" 
&lt;BR /&gt; 
&lt;BR /&gt;Job_2 
&lt;BR /&gt;trunjob -&amp;gt;onsubjobok -&amp;gt;toracleinput -&amp;gt;tmap-&amp;gt;toracleoutput 
&lt;BR /&gt;in toracleinput my query would be "select * from tablename where co_date&amp;gt;context.rundate"</description>
      <pubDate>Tue, 31 Jul 2012 00:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203311#M4680</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-07-31T00:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203312#M4681</link>
      <description>"Transmit whole context" passes all the context variables in the job containing the tRunJob to the job called by the tRunJob. 
&lt;BR /&gt;So your master job would be toracleinput-&amp;gt;tjavarow -onsubjobok-&amp;gt; trunjob (job1) -onsubjobok-&amp;gt; trunjob (job2). 
&lt;BR /&gt;Job1 and Job2 would just be toracleinput -&amp;gt;tmap-&amp;gt;toracleoutput.</description>
      <pubDate>Tue, 31 Jul 2012 01:02:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203312#M4681</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-07-31T01:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203313#M4682</link>
      <description>toracleinput-&amp;gt;tjavarow -onsubjobok-&amp;gt; trunjob (job1) -onsubjobok-&amp;gt; trunjob (job2). 
&lt;BR /&gt;Job1 and Job2 would just be toracleinput -&amp;gt;tmap-&amp;gt;toracleoutput. 
&lt;BR /&gt;The above works 
&lt;BR /&gt;if I create JOB0 as toracleinput-&amp;gt;tjavarow 
&lt;BR /&gt;and then create separate master job as below with Transmit whole context" checked it does not pass the value 
&lt;BR /&gt;WHY? 
&lt;BR /&gt; trunjob (job0)-&amp;gt;onsubjobok-&amp;gt; trunjob (job1) -onsubjobok-&amp;gt; trunjob (job2).</description>
      <pubDate>Tue, 31 Jul 2012 17:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203313#M4682</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-07-31T17:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203314#M4683</link>
      <description>Because context variables are passed from parent to child not the other way around i.e. if they're loaded in job0, they are not passed back to the master job.
&lt;BR /&gt;To do so, you need to add -onsubjobok-&amp;gt;tContextDump--&amp;gt;tBufferOutput as the last step in job0, then in the master job, copy the child job's schema in tRunJob and pass the flow to tContextLoad before calling jobs 1 and 2.</description>
      <pubDate>Wed, 01 Aug 2012 00:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203314#M4683</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-08-01T00:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203315#M4684</link>
      <description>Job 0&lt;BR /&gt; &lt;BR /&gt; toracleinput-&amp;gt;tjavarow &lt;BR /&gt;   |&lt;BR /&gt;    -onsubjobok-&amp;gt;tjava&lt;BR /&gt;    -onsubjobok-tContextDump--&amp;gt;tBufferOutput -tlogrow&lt;BR /&gt;the context.rundate prints fine in tjava but is null when I see the tlogrow&lt;BR /&gt;Any ideas?</description>
      <pubDate>Wed, 01 Aug 2012 21:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203315#M4684</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-08-01T21:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: tsetGlobalVar</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203316#M4685</link>
      <description>Yes, sorry, forgot to add that if you set context values manually in a job (i.e. context.rundate = row1.rundate 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; then you also need the statement context.synchronizeContext(); afterwards for the changed value to be picked up by tContextDump. (If you use tContextLoad, the extra statement is not necessary.)</description>
      <pubDate>Thu, 02 Aug 2012 00:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tsetGlobalVar/m-p/2203316#M4685</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-08-02T00:12:26Z</dc:date>
    </item>
  </channel>
</rss>

