Passing context variable from unix shell to Parent Job and then passing it to child job

Highlighted
Seven Stars

Passing context variable from unix shell to Parent Job and then passing it to child job

I have a requirement. I am trying to pass a context variable defined in Talend(name=nomeFile, value=context.nome_file) from unix to myParent Job and then I want to pass it between my jobs. In this case the variable must be read from mainALF and passed to subLoad_Alf. I developed both ParentJob and ChildJob and after that I build myParentJob. At this point from unix terminal I wrote the following command:

 

./myParentJob.sh --context_param nomeFile="myDirectory/FileName.txt" and I does not work. I got "No such file or directory".

 

On the contrary, If I build myChildJob(subLoad_Alf) and I run the same command: ./myChildJob.sh --context_param nomeFile="myDirectory/FileName.txt" it works.

I think I am not able to read the context variable (nomeFile) in the ParentJob and send its value ("myDirectory/FileName.txt") to myChildJob. 

Does anyone can help me to figure out how to achieve this requirement? Thank you in advance

Four Stars

Re: Passing context variable from unix shell to Parent Job and then passing it to child job

Hello,

 

Your command seems to be right.

Did you try to execute the master job in your studio, moving the filepath context ? Does it works ?

 

Regards,

Aurélien.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog