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.

Pass parameters to oozie subworkflow

SOLVED Go to solution

Pass parameters to oozie subworkflow

Rising Star

Hello,

Is it possible to pass parameters to oozie subworkflows from the parent workflow actions using the actionData funciton, i.e. ${wf:actionData('ParentWFAction')['PARAM_NAME']}?

 

Thanks,

Martin

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Pass parameters to oozie subworkflow

Rising Star

Hi Harsh, thanks for the follow up, though it's not 100% clear from the response what needs to be done.

 

However, I was able to figure out the following & posting here for the benefit of the community. In the subworkflow task, you can use the Job Properties box to achieve this, e.g.

 

Property Name = PARAM1

Property Value = ${wf:actionData('ParentWFAction')['PARAM_NAME']}

 

Then in the subworkflow itself, you will be able to access the value as ${PARAM1}.

 

Regards,

Martin

4 REPLIES 4

Re: Pass parameters to oozie subworkflow

Master Guru
You can use on the to pass any variable
name and substituted values around.

Highlighted

Re: Pass parameters to oozie subworkflow

Rising Star

Hi Harsh, thanks for the follow up, though it's not 100% clear from the response what needs to be done.

 

However, I was able to figure out the following & posting here for the benefit of the community. In the subworkflow task, you can use the Job Properties box to achieve this, e.g.

 

Property Name = PARAM1

Property Value = ${wf:actionData('ParentWFAction')['PARAM_NAME']}

 

Then in the subworkflow itself, you will be able to access the value as ${PARAM1}.

 

Regards,

Martin

Re: Pass parameters to oozie subworkflow

New Contributor

Hi, How can I get the status of the workflow and the execution time taken by the workflow through these commands, 

 

${wf:actionData('ParentWFAction')['PARAM_NAME']}

Re: Pass parameters to oozie subworkflow

Rising Star
Hi sairamvj, I would suggest you open a new thread for your question, as it is not related to this topic of this thread.

Martin