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 except 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, refer to Requiring a JDK installation to build jobs starting from version 6.0.

 

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:

    jobDesign.png


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

    append.png


  3. 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 the Job name in the Repository view. Select Build Job (or Export Job prior to version 5.4.0) to export the Job script.

    export_job_script.png


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

    export_job.png


 

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: in this example, by clicking the ExportDemo_run.bat file on a Windows system, or by executing the ExportDemo_run.sh file on a Unix/Linux system.
  4. Open the file D:/file/out.txt and verify that the current timestamp was appended.
Version history
Revision #:
2 of 2
Last update:
‎06-22-2017 09:14 PM
Updated by:
 
Labels (1)
Tags (1)