<?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 Passing Parameters to Oozie Job Through tRestClient in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224340#M17089</link>
    <description>Talend Community, 
&lt;BR /&gt;I am currently working on a project where we want to execute many oozie jobs from a talend job. We are able to deploy an oozie job that runs on a static context and it performs an action. However, what if I want to start an oozie job the the tRestClient by calling : 
&lt;BR /&gt;http://hdfs-name-node/oozie/v1/jobs?action=start 
&lt;BR /&gt;and posting to the above uri the following xml: 
&lt;BR /&gt;&amp;lt;configuration&amp;gt; 
&lt;BR /&gt;&amp;lt;property&amp;gt; 
&lt;BR /&gt;&amp;lt;name&amp;gt; 
&lt;BR /&gt;oozie.wf.application.path 
&lt;BR /&gt;&amp;lt;/name&amp;gt; 
&lt;BR /&gt;&amp;lt;value&amp;gt; 
&lt;BR /&gt;{path to deployed oozie job} 
&lt;BR /&gt;&amp;lt;/value&amp;gt; 
&lt;BR /&gt;&amp;lt;/property&amp;gt; 
&lt;BR /&gt;... 
&lt;BR /&gt;&amp;lt;/configuration&amp;gt; 
&lt;BR /&gt;I know this works. I can start the oozie job through the tRestClient by posting the xml to the aforementioned uri. 
&lt;BR /&gt;What I don't know how to do is access additional variables in the posted configuration xml from the started job. Typically, these type of things can be done by writing custom coordinator/workflow oozie scripts, but I was looking for a way that is handled directly through talend methodologies and not require custom work. 
&lt;BR /&gt;Let's say I want to access a variable such as a String called, mediaId. And I will use that mediaId to inform the job where to look in order to complete it's task. Now, I can use the configuration xml to pass a property with name mediaId and a String value of let's say "1234". When I post this configuration and look at the oozie scheduler on cloudera I find that the oozie job was started and I can actually see the variable in the details. However, I just need to be able to access that from within the job. 
&lt;BR /&gt;Thoughts? Has anyone done this before? 
&lt;BR /&gt;Cheers, 
&lt;BR /&gt;James Gilchrist</description>
    <pubDate>Thu, 06 Feb 2014 18:35:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-06T18:35:11Z</dc:date>
    <item>
      <title>Passing Parameters to Oozie Job Through tRestClient</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224340#M17089</link>
      <description>Talend Community, 
&lt;BR /&gt;I am currently working on a project where we want to execute many oozie jobs from a talend job. We are able to deploy an oozie job that runs on a static context and it performs an action. However, what if I want to start an oozie job the the tRestClient by calling : 
&lt;BR /&gt;http://hdfs-name-node/oozie/v1/jobs?action=start 
&lt;BR /&gt;and posting to the above uri the following xml: 
&lt;BR /&gt;&amp;lt;configuration&amp;gt; 
&lt;BR /&gt;&amp;lt;property&amp;gt; 
&lt;BR /&gt;&amp;lt;name&amp;gt; 
&lt;BR /&gt;oozie.wf.application.path 
&lt;BR /&gt;&amp;lt;/name&amp;gt; 
&lt;BR /&gt;&amp;lt;value&amp;gt; 
&lt;BR /&gt;{path to deployed oozie job} 
&lt;BR /&gt;&amp;lt;/value&amp;gt; 
&lt;BR /&gt;&amp;lt;/property&amp;gt; 
&lt;BR /&gt;... 
&lt;BR /&gt;&amp;lt;/configuration&amp;gt; 
&lt;BR /&gt;I know this works. I can start the oozie job through the tRestClient by posting the xml to the aforementioned uri. 
&lt;BR /&gt;What I don't know how to do is access additional variables in the posted configuration xml from the started job. Typically, these type of things can be done by writing custom coordinator/workflow oozie scripts, but I was looking for a way that is handled directly through talend methodologies and not require custom work. 
&lt;BR /&gt;Let's say I want to access a variable such as a String called, mediaId. And I will use that mediaId to inform the job where to look in order to complete it's task. Now, I can use the configuration xml to pass a property with name mediaId and a String value of let's say "1234". When I post this configuration and look at the oozie scheduler on cloudera I find that the oozie job was started and I can actually see the variable in the details. However, I just need to be able to access that from within the job. 
&lt;BR /&gt;Thoughts? Has anyone done this before? 
&lt;BR /&gt;Cheers, 
&lt;BR /&gt;James Gilchrist</description>
      <pubDate>Thu, 06 Feb 2014 18:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224340#M17089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T18:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameters to Oozie Job Through tRestClient</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224341#M17090</link>
      <description>I just verified that if I navigate to the workflow.xml in the directory where I deployed my oozie job and add a couple arguments: 
&lt;BR /&gt;...&amp;lt;arg&amp;gt;--context_param&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;contextVariable=${input}&amp;lt;/arg&amp;gt;... 
&lt;BR /&gt;where the configuration file posted through tRestClient contains the property 
&lt;BR /&gt;&amp;lt;property&amp;gt;&amp;lt;name&amp;gt;input&amp;lt;/name&amp;gt;&amp;lt;value&amp;gt;input string&amp;lt;/value&amp;gt;&amp;lt;/property&amp;gt; 
&lt;BR /&gt;then it will in fact pass in the variable dynamically and overwrite the default context parameter with the input variable. 
&lt;BR /&gt;However, this is not smooth. This would mean that a job would have to be deployed (would most likely fail or run incorrectly the first time on initial deployment) and then I would have to go manual change the workflow.xml. I don't want to do this. I would like it to build the workflow.xml for me in the right way. 
&lt;BR /&gt;Thoughts?</description>
      <pubDate>Thu, 06 Feb 2014 19:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224341#M17090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T19:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameters to Oozie Job Through tRestClient</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224342#M17091</link>
      <description>Hi James,&lt;BR /&gt;I am trying to figure out how to execute Oozie work flow through Talend and found your post. I couldn't figure how to run the Oozie work flow in Talend.&lt;BR /&gt;Could you please explain in detail how you were able to run the Oozie workflow in Talend.&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Sai</description>
      <pubDate>Tue, 03 Mar 2015 17:54:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Parameters-to-Oozie-Job-Through-tRestClient/m-p/2224342#M17091</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-03-03T17:54:41Z</dc:date>
    </item>
  </channel>
</rss>

