Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

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

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

Contributor

 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.