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

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.