<?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] Parent and Child Jobs - Contexts in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303812#M75647</link>
    <description>In the parent job, don't forget to check the "Transmit whole context" option in tRunJob. 
&lt;BR /&gt;In the child job, your first component should just be an empty tJava. From that have an If trigger (!"Y".equals(context.is_it_called_from_parent)) to tFileInput --&amp;gt; tContextLoad. Then just OnSubjobOK from the tJava to the real part of your job. 
&lt;BR /&gt;You can also, if you want, use an If trigger ("Y".equals(context.is_it_called_from_parent)) from tJava and an OnComponentOK from tContextLoad (or OnSubjobOK from tFileInput) to the real part of your job.</description>
    <pubDate>Fri, 26 Apr 2013 02:21:43 GMT</pubDate>
    <dc:creator>alevy</dc:creator>
    <dc:date>2013-04-26T02:21:43Z</dc:date>
    <item>
      <title>[resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303809#M75644</link>
      <description>I am working on my first project. I have created 10 jobs that basically extract data from a SQL Server database and create 10 different CSV files. I am making use of context variables to externalize all connection info etc. so we can have different settings for each environment, DEV, TEST and Production. 
&lt;BR /&gt;. 
&lt;BR /&gt;In most cases we require one controlling job that will call each of the separate jobs, so only one job needs to be scheduled. So I am defining a controlling job that will use tRunjob to call the jobs. I am planning on passing the context's down to the child jobs. My questions are 
&lt;BR /&gt;. 
&lt;BR /&gt;In the child jobs, do we have to do anything to load the context's or since they are passed from the parent job nothing is required.? 
&lt;BR /&gt;. 
&lt;BR /&gt;Secondly if for some reason someone wanted to schedule and run one of the child jobs independently I am presuming this would have to load the contexts since it is not getting called from the parent job, what way would you handle this, or would you force everything to go through the parent job and some configuration setting to allow the user to indicate if they want only one job to run. 
&lt;BR /&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Derek</description>
      <pubDate>Sat, 16 Nov 2024 12:02:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303809#M75644</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T12:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303810#M75645</link>
      <description>Hello,
&lt;BR /&gt;For the first question you can find a great article here:
&lt;BR /&gt;Talend Subjobs: Passing Full Context to tRunJob
&lt;BR /&gt;
&lt;A href="http://jufeappdev.blogspot.fr/2013/02/talend-trunjob-passing-full-context.html" rel="nofollow noopener noreferrer"&gt;http://jufeappdev.blogspot.fr/2013/02/talend-trunjob-passing-full-context.html&lt;/A&gt;</description>
      <pubDate>Thu, 25 Apr 2013 12:38:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303810#M75645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-25T12:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303811#M75646</link>
      <description>Thanks for the link, I had seen this before but I reread it again. From this article what I gathered is that I should define the same context variables in the child that exists in the parent. 
&lt;BR /&gt;. 
&lt;BR /&gt;So the logic I am trying to implement in the child job is as follows 
&lt;BR /&gt; 
&lt;BR /&gt;(the context is_it_called_from_parent will be set to 'Y' in the Parent Job.) 
&lt;BR /&gt;at the beginning 
&lt;BR /&gt; 
&lt;BR /&gt;a. check context.is_it_called_from_parent ='N' Then execute tContext_load 
&lt;BR /&gt;b. If context.is_it_called_from_parent='Y' Then skip tContext_load 
&lt;BR /&gt;c. continue with child job 
&lt;BR /&gt;. 
&lt;BR /&gt;but I having trouble figuring out how to implement this, can you can have a condition ie. If clause and then link back so the job continues? 
&lt;BR /&gt; 
&lt;BR /&gt;Derek</description>
      <pubDate>Thu, 25 Apr 2013 15:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303811#M75646</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-04-25T15:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303812#M75647</link>
      <description>In the parent job, don't forget to check the "Transmit whole context" option in tRunJob. 
&lt;BR /&gt;In the child job, your first component should just be an empty tJava. From that have an If trigger (!"Y".equals(context.is_it_called_from_parent)) to tFileInput --&amp;gt; tContextLoad. Then just OnSubjobOK from the tJava to the real part of your job. 
&lt;BR /&gt;You can also, if you want, use an If trigger ("Y".equals(context.is_it_called_from_parent)) from tJava and an OnComponentOK from tContextLoad (or OnSubjobOK from tFileInput) to the real part of your job.</description>
      <pubDate>Fri, 26 Apr 2013 02:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303812#M75647</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-04-26T02:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303813#M75648</link>
      <description>Correct. Please take care, the first job contains all needed context variables which are used in the embedded job, only in this case the option "Transmit whole context" make sense.</description>
      <pubDate>Fri, 26 Apr 2013 07:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303813#M75648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-26T07:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303814#M75649</link>
      <description>Thanks for all the responses.
&lt;BR /&gt;.
&lt;BR /&gt;I have it working, where I load the context's in the parent and then call all the child jobs. If a child gets scheduled to run on it's own it will check a context and determine that it needs to execute tContext_load.
&lt;BR /&gt;.
&lt;BR /&gt;The one simple thing I had to figure out was the difference between onSubJobOk and OnComponentOk, making use of OnComponentOk to link subjobs allow them all to be executed as one SubJob so the job will not continue till all the jobs that make up reading context's is completed.
&lt;BR /&gt;.
&lt;BR /&gt;Here is a link I liked for working with context's that I based my solution of.
&lt;BR /&gt;&lt;A href="http://www.talendbyexample.com/talend-load-context-example.html" rel="nofollow noopener noreferrer"&gt;http://www.talendbyexample.com/talend-load-context-example.html&lt;/A&gt;</description>
      <pubDate>Sun, 28 Apr 2013 14:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303814#M75649</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-04-28T14:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Parent and Child Jobs - Contexts</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303815#M75650</link>
      <description>This tutorial has now been improved so that context can be loaded using a SubJob.&lt;BR /&gt;&lt;A href="http://www.talendbyexample.com/talend-reusable-context-load-job.html" rel="nofollow noopener noreferrer"&gt;http://www.talendbyexample.com/talend-reusable-context-load-job.html&lt;/A&gt;</description>
      <pubDate>Sun, 02 Jun 2013 11:07:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Parent-and-Child-Jobs-Contexts/m-p/2303815#M75650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-02T11:07:50Z</dc:date>
    </item>
  </channel>
</rss>

