Search code examples
javabashtalend

How can I pass parameter in Talend exported job, through command line or bash script file?


After exporting the talend job, I want to modify the code (java).

Example I want to change the table name, Database name and also want to pass parameter through command line.

If I add the line System.out.println("SANDY") in main function (java source) and on terminal doing $ bash jobname.sh, where SANDY will be printed?


Solution

  • This is why there is context varibles in Talend, you can develop your job using context variables to avoid hard coded values then load context from external file or prompt user to enter these values and you can also define multiple contexts, please see talend help.