Skip to main content Skip to complementary content

Building Jobs

The Build Job feature allows you to deploy and execute a Job on any server, independent of Talend Studio.

However, executing Jobs in Talend Management Console requires you to Publishing to Talend Cloud instead of building it.

About this task

By executing build scripts generated from the templates defined in Project Settings, the Build Job feature adds all of the files required to execute the Job to an archive, including the .bat and .sh along with any context-parameter files or other related files.

Information noteNote: Talend Studio provides a set of default build script templates. You can customize those templates to meet your actual needs. For more information, see Customizing shell command templates and Customizing Maven build script templates.

By default, when a Job is built, all the required jars are included in the .bat or .sh command. For a complex Job that involves many Jars, the number of characters in the batch command may exceed the limitation of command length on certain operating systems. To avoid failure of running the batch command due to this limitation, before building your Job, go to Window > Preferences > Talend > Import/Export and then select the Add classpath jar in exported jobs check box to wrap the Jars in a classpath.jar file added to the built Job.

Information noteWarning: The above-mentioned option is incompatible with Talend JobServer or Talend Remote Engine. If your built Job will be deployed and executed in Talend Administration Center or Talend Management Console, make sure to clear the check box before building your Job.
Information noteNote: The SOAP data service Job including the tESBProviderRequest component that implements a service operation can not be built independently. The Job has to be built with the service it is assigned to. When you export a SOAP service, all the data service Jobs that implement the service operations are built in the service archive file as well.

Procedure

  1. In the Repository tree view, right-click the Job you want to build, and select Build Job to open the Build Job dialog box.
    Information noteNote: You can show/hide a tree view of all created Jobs in Talend Studio directly from the Build Job dialog box by clicking the Double right arrow to show the tree view and the Double left arrow to hide the tree view buttons respectively. The Jobs you earlier selected in the Talend Studio tree view display with selected check boxes. This accessibility helps to modify the selected items to be exported directly from the dialog box without having to close it and go back to the Repository tree view in Talend Studio to do that.
    Build Job dialog box.
  2. In the To archive file field, browse to the directory where you want to save your built Job.
  3. From the Select the Job version area, select the version number of the Job you want to build if you have created more than one version of the Job.
  4. Select the Build Type from the list:
    • Standalone Job
    • Talend Runtime (OSGI)
    • Microservice
    • Microservice as Docker Image
    • Availability-noteDeprecated
      Microservice Spring Boot
    • Availability-noteDeprecated
      Microservice Spring Boot as Docker Image
    • Docker Image
    Note that data service Jobs that include the tRESTRequest component can only be built as:
    • Talend Runtime (OSGI)
    • Microservice
    • Microservice as Docker Image
    • Availability-noteDeprecated
      Microservice Spring Boot
    • Availability-noteDeprecated
      Microservice Spring Boot as Docker Image

    If the data service Job includes the tRESTClient or tESBConsumer component, and none of the Service Registry, Service Locator or Service Activity Monitoring is enabled in the component, the data service Job can be built as Talend Runtime (OSGI) or Standalone Job. With the Service Registry, Service Locator or Service Activity Monitoring enabled, the data service Job including the tRESTClient or tESBConsumer component can only be built as Talend Runtime (OSGI).

  5. Select the Extract the zip file check box if you want the archive file to be automatically extracted in the target directory.
  6. In the Options area, select the check boxes corresponding to the file type(s) you want to add to the archive file. The check boxes corresponding to the file types necessary for the execution of the Job are selected by default. You can clear these check boxes depending on what you want to build.
    Option Description
    Binaries This option is selected by default to build your Job as an executable Job.
    Shell launcher Select this check box to export the .bat and/or .sh files necessary to launch the built Job.
    • All: exports the .bat and .sh files.
    • Unix exports the .sh file.
    • Windows exports the .bat file.
    Context scripts Select this check box to export ALL context parameters files and not just those you select in the corresponding list.
    Information noteNote: To export only one context, select the context that fits your needs from the Context scripts list, including the .bat or .sh files holding the appropriate context parameters. Then you can, if you wish, edit the .bat and .sh files to manually modify the context type.
    Apply to children Select this check box if you want to apply the context selected from the list to all child Jobs.
    Custom log4j level Select this check box to activate the Log4j output level list and select an output level for the built Job.

    For more information on Log4j settings, see Activating and configuring Log4j.

    Items Select this check box to export the sources used by the Job during its execution including the .item and .properties files, Java and Talend sources.
    Information noteNote: If you select the Items or Source files check box, you can reuse the built Job in a Talend Studio installed on another machine. These source files are only used in Talend Studio.

    You must select this check box if you want to run the Job in Talend Administration Center.

    Execute tests Select this check box to execute the test case(s) of the Job, if any, when building the Job, and include the test report files in the sunfire-reports folder of the build archive.

    This check box is available only when the Binaries option is selected.

    For more information on how to create test cases, see Testing Jobs and Services using test cases.

    Java sources Select this check box to export the .java file holding Java classes generated by the Job when designing it.

    This check box is available only when the Binaries option is selected.

  7. Click the Override parameters' values button, if necessary.
    In the window which opens you can update, add or remove context parameters and values of the Job context you selected in the list.
  8. Click Finish to validate your changes, complete the build operation and close the dialog box.

Results

A zipped file for the Jobs is created in the defined place.

Information noteNote: If the Job to be built calls a user routine that contains one or more extra Java classes in parallel with the public class named the same as the user routine, the extra class or classes will not be included in the exported file. To export such classes, you need to include them within the class with the routine name as inner classes. For more information about user routines, see Managing user routines. For more information about classes and inner classes, see relevant Java manuals.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!