One Star

Talend job for Windows and Linux

I have a talend job that runs fine in Windows. It also needs to be able to run in Linux. Can anyone tell me the steps that I need to take in order to be able to run the job from both Windows and Linux? I use a context file to load the context variables into the job.
5 REPLIES
Community Manager

Re: Talend job for Windows and Linux

Hi
Use context variable for the component parameter which may be changed while the job runs on different system, such as the file path. Define different contexts for different system, for example, we have a variable called filepath, it has two contexts with corresponding value. (see my screenshot), please read how to configure context.
When you are going to execute the job, specify the context first.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Talend job for Windows and Linux

This all makes sense. One thing, though....The job is going to be exported and executed through the shell script (the .sh created by the export) on the linux machine. Can you tell me how to have the .sh call the correct context file at runtime?
One Star

Re: Talend job for Windows and Linux

Please let me know your thoughts on what I need to do in order to run the .sh and have it reference the linux context file rather than the windows one. Thanks,
Seventeen Stars

Re: Talend job for Windows and Linux

hi all
for example you can tell that the context is the dev one, and if you are using a config file you can notice the path to it
java -Xms256M -Xmx1024M -cp classpath.jar ....Your Job sequenceur ..... --context=Default --context_param ConfigFileName=/opt/talend/config/dev.conf

it's just an example about param you can use !
regards
laurent
Community Manager

Re: Talend job for Windows and Linux

Please let me know your thoughts on what I need to do in order to run the .sh and have it reference the linux context file rather than the windows one. Thanks,

You can specify the context by modify the job script. For example:
java -Xms256M -Xmx1024M -cp classpath.jar ....Your Job sequenceur ..... --context=ContextName
----------------------------------------------------------
Talend | Data Agility for Modern Business