<?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] passing context from command line to sub jobs in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313838#M84656</link>
    <description>akashsonawane - seems like you're doing everything Ok. 
&lt;BR /&gt;Parameters can be set at a runtime with the --context_param command line switch. For example with the command: 
&lt;BR /&gt;JobTest_run.bat --context_param ParamA=ValueA --context_param ParamB=ValueB 
&lt;BR /&gt;You can also edit JobTest_run.bat and set the parameter value directly into the script: 
&lt;BR /&gt;java -Xms256M -Xmx1024M -cp classpath.jar; test2.jobtest_0_1.JobTest --context=Default 
&lt;BR /&gt;--context_param ParamA=ValueA --context_param ParamB=ValueB 
&lt;BR /&gt;What I'd do next is to print the values using System.out.println in tJavas in all jobs - of the contexts that are not getting loaded properly. That should point out where you have hiccups in your job.</description>
    <pubDate>Wed, 07 May 2014 15:15:01 GMT</pubDate>
    <dc:creator>willm1</dc:creator>
    <dc:date>2014-05-07T15:15:01Z</dc:date>
    <item>
      <title>[resolved] passing context from command line to sub jobs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313836#M84654</link>
      <description>Hi , 
&lt;BR /&gt;I want to pass the context variables from command line to job and its sub jobs. 
&lt;BR /&gt;Please find the job design as below: 
&lt;BR /&gt;Job 1 -- trunjob(will trigger second job Job 2) -- &amp;gt;Job 2 -- trunjob(will trigger third job Job 3) --- &amp;gt; Job 3; 
&lt;BR /&gt;(I have checked the check box present in trunjob as transmit whole context.. still it is not working..) 
&lt;BR /&gt;I want to pass the context variables to all Job 1, Job 2 , Job 3 through the command line. 
&lt;BR /&gt;can anyone tell me how do i achieve the same. 
&lt;BR /&gt;I have used the below syntax but it is not working. 
&lt;BR /&gt;Job 1.bat --context_param db_database=xyz --context_param db_host=abc --context_param db_username=user 
&lt;BR /&gt;all these context variables are present in all the three jobs. 
&lt;BR /&gt;first job is getting executed properly but for the second job it is giving me error that db_host is null..? 
&lt;BR /&gt;Thanking you, 
&lt;BR /&gt;with kind regards, 
&lt;BR /&gt;Akash Sonawane.</description>
      <pubDate>Wed, 07 May 2014 12:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313836#M84654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-07T12:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] passing context from command line to sub jobs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313837#M84655</link>
      <description>Hi Akash, 
&lt;BR /&gt;As per your explanation if things are working as expected, then it is weird that context parameter loaded by parent jobs through command line are not passed through the parent job to subjob. 
&lt;BR /&gt;But, as a standard practice, in Main Job, load context parameters through property file and using tContextLoad component make it available to all the subJobs (provided you enable the check box for transmit whole context) 
&lt;BR /&gt; 
&lt;A href="https://help.talend.com/search/all?query=tContextLoad&amp;amp;content-lang=en" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/search/all?query=tContextLoad&amp;amp;content-lang=en&lt;/A&gt; 
&lt;BR /&gt;Someone from talend would come up with the answer else you can create a bug on this. 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Wed, 07 May 2014 13:11:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313837#M84655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-07T13:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] passing context from command line to sub jobs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313838#M84656</link>
      <description>akashsonawane - seems like you're doing everything Ok. 
&lt;BR /&gt;Parameters can be set at a runtime with the --context_param command line switch. For example with the command: 
&lt;BR /&gt;JobTest_run.bat --context_param ParamA=ValueA --context_param ParamB=ValueB 
&lt;BR /&gt;You can also edit JobTest_run.bat and set the parameter value directly into the script: 
&lt;BR /&gt;java -Xms256M -Xmx1024M -cp classpath.jar; test2.jobtest_0_1.JobTest --context=Default 
&lt;BR /&gt;--context_param ParamA=ValueA --context_param ParamB=ValueB 
&lt;BR /&gt;What I'd do next is to print the values using System.out.println in tJavas in all jobs - of the contexts that are not getting loaded properly. That should point out where you have hiccups in your job.</description>
      <pubDate>Wed, 07 May 2014 15:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313838#M84656</guid>
      <dc:creator>willm1</dc:creator>
      <dc:date>2014-05-07T15:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] passing context from command line to sub jobs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313839#M84657</link>
      <description>Hi 
&lt;BR /&gt;- Make sure the 'transmit the whole context' option on tRunJob is checked. 
&lt;BR /&gt;- The child jobs have the same context and the same variables as parent job, for example, db_host both exist in parent job and child job. 
&lt;BR /&gt;- Specify a new value to context variable when executing the job script from command prompt, for example 
&lt;BR /&gt; 
&lt;PRE&gt;D:\file\SpecifyContextVariableDemo_0.1\SpecifyContextVariableDemo&amp;gt;jobName.bat --context=Default --context_param nb_line=3 --context_param name=Talend3&lt;/PRE&gt; 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 07 May 2014 15:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313839#M84657</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-07T15:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] passing context from command line to sub jobs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313840#M84658</link>
      <description>Hello Shong and Willm, 
&lt;BR /&gt;would like to thank you for your quick reply. 
&lt;BR /&gt;I got the solutions and the solutions is I am using the globalMap.get("DB_Host") in the context tab in value field of DB_Host parameter so like wise i am storing all the context variables value and now they getting passed to next subjobs. 
&lt;BR /&gt;Thank you again for your valuable time. 
&lt;BR /&gt;Thanking you, 
&lt;BR /&gt;with kind regards, 
&lt;BR /&gt;Akash Sonawane</description>
      <pubDate>Thu, 08 May 2014 08:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313840#M84658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-08T08:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] passing context from command line to sub jobs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313841#M84659</link>
      <description>You're most welcome...</description>
      <pubDate>Thu, 08 May 2014 19:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-passing-context-from-command-line-to-sub-jobs/m-p/2313841#M84659</guid>
      <dc:creator>willm1</dc:creator>
      <dc:date>2014-05-08T19:44:35Z</dc:date>
    </item>
  </channel>
</rss>

