Exporting a Job script and executing it outside of Talend Studio

 Overview

Talend Jobs support cross-platform execution. You can develop your Job on one machine, export the Job script, and then move it to another machine to execute without any additional configuration excepts the JDK installation. This article explains how to export the Job script and execute it outside of Talend Studio.

Environment

This procedure was written with:

  • Talend Open Studio for Data Integration 5.4.1-r111943
  • JDK version: Sun JDK build 1.6.0_26-b03
  • Operating system: Windows XP SP3

Talend verified this procedure to be compatible with Talend Open Studio for Data Integration starting from version 4.2.3.


Starting from version 6.0, Talend Studio requires a JDK installation to build jobs completely, for more information, please refer to this article.

 Procedure

Create an example Job

  1. Create a Job called ExportDemo. This Job generates the current timestamp and appends it to a file (for example, "D:/file/out.txt"). The detailed Job design is as follows:



    On tFileOutputDelimited component, check the 'Append' box to append the current timestamp to an existing file whenever the job is executed.



  2. Execute the Job to ensure it works in Talend Studio. Then open the file "D:/file/out.txt" and verify that the current timestamp was written to the file. For example, the file has a new record as follows:

    11-07-2012 10:36:00

Export the Job script

To export the Job script follow these steps:

  1. Right-click on the Job name in the Repository view. Select Build Job (or Export Jobprior to version 5.4.0) to export the Job script.

  2. Browse to the location where you to export the Job script. Select the Autonomous Job item in the Export type list, finally, click Finish.

 

Execute the Job

  1. Copy the zip file to another machine if necessary. Unzip the zip file.
  2. Open the folder where the executable files (jobName_run.bat / jobName_run .sh) are located.
    For example: "D:\file\ExportDemo_0.1\ExportDemo". 
  3. Execute the Job by clicking the jobName_run.bat file (in this example, ExportDemo_run.bat) on a Windows system, or executing the jobName_run .sh file (in this example, ExportDemo_run.sh) on a Unix / Linux system.
  4. Open the file "D:/file/out.txt" and verify that the current time stamp was appended.
Version History
Revision #:
1 of 1
Last update:
‎04-17-2017 08:25 PM
Updated by:
 
Labels (1)
Contributors