Passing context variable from one shell script to another.

Four Stars

Passing context variable from one shell script to another.

Hi there,

 

I have the following problem: While using the "Build Job" option in Talend to create a executable shell script, this script gets cleary overwritten when I use the "Build Job" option again (e.g. a newer version of the job is created). This means, that all of my declared context variables inside the script are getting deleted. Therefore I want to write a second shell script, in which all of my context is declared and, calls the executable shell script from the "Build Job" option and passes the context to it. 

 

So here is my question: Is it possible to pass context variables from a arbitrary shell script to the executable shell script, without editing the executable shell script?

 

Best regards

 

Kanopus

Highlighted
Community Manager

Re: Passing context variable from one shell script to another.

Hi
I am trying to understand your issue. Why you said the context variable are deleted? If you build the same job and with the same path, the context variable are still export in the executable script.

Did you edit the script and pass the new value to context variables?

Regards
Shong

----------------------------------------------------------
Talend | Data Agility for Modern Business
Seven Stars JGM
Seven Stars

Re: Passing context variable from one shell script to another.

you can pass context to the generated scripts by using the arguments: ./jobName_run.sh --context_param VAR1=VALUE1 --context_param VAR2=VALUE2
Four Stars

Re: Passing context variable from one shell script to another.

./jobName_run.sh --context_param VAR1=VALUE1 --context_param VAR2=VALUE2

 

Can some please tell me how to pass the variable value from my shell script to talend context ?

 

I want send to tsoap  from the shell script output values. if you guys have any step by step guidance.

 

thanks 

 

 

 

Nine Stars

Re: Passing context variable from one shell script to another.

Hi

When you build a job, it's build the job with the parameters that are in your context.

If you are using differents parameters to run the job, you have two options :

 

1- You create many contexts : Default, Test, Prod, Dev, ...

And simply use the appropriate context when running the job

 

2. You can create a file with the parameters you want to use in the job, and load it with tContextLoad

 

Hoping that this will help

 

Regards

Maurice

Regards
DGM
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog