O'Reilly logo

Talend Open Studio Cookbook by Rick Barton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Executing non-Talend objects and operating system commands

Often, when running a schedule, it is necessary to execute a mixture of Talend and non-Talend objects, such as database scripts, batch files, or shell scripts. This exercise shows how this is easily achieved using Talend.

Note

Note that this exercise is for Windows only.

Getting ready

Open the job jo_cook_ch11_0080_systemCalls.

How to do it…

  1. Drag a tSystem component onto the canvas.
  2. Set the Command to the following:
    "cmd /c"+context.cookbookData+"/batchFiles/jo_cook_ch11_0080_batchFile.bat"
  3. Add a tJava component, and add the following code:
    System.out.println("Return code"+((Integer)globalMap.get("tSystem_1_EXIT_VALUE")));
  4. Link the two components using and onSubjobOk trigger and then run the job. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required