Reply
Contributor
Posts: 43
Registered: ‎01-19-2017

apache oozie passing parameter from output of shell script oozie action to sqoop oozie action

 Hi,

 

 I like to pass variable from oozie action shell script to the oozie sqoop action.

##prepare_variable.sh

#!/bin/sh
export source_partition=p_${year_month}

workflow.xml

workflow-app name="test" xmlns="uri:oozie:workflow:0.4">
<start to="prepare_variables"/>

<action name="prepare_variables">
          <shell xmlns="uri:oozie:shell-action:0.1">
		  
                <job-tracker>${jobTracker}</job-tracker>
                <name-node>${nameNode}</name-node>
				
                <exec>prepare_variables.sh</exec>
		<file>prepare_variables.sh#prepare_variables.sh</file>			
                <capture-output/>
          </shell>
          <ok to="export_oracle"/>
          <error to="kill"/>
  </action>
<action name="export_oracle">
        <sqoop xmlns="uri:oozie:sqoop-action:0.2">
--
--

Thank you in advance.

 

Announcements