Skip to main content Skip to complementary content

Creating a Job from a template

About this task

Talend Studio enables you to use the following different templates to create ready-to-run Jobs:

This feature is not shipped with Talend Studio by default. You need to install it using the Feature Manager. For more information, see Installing features using the Feature Manager.

Outputting data from a file to a database table and vice versa

About this task

You can use different templates to create a Job that writes data from a file to a database table or from a database table to a file, do the following:

Procedure

  1. In the Repository tree view of the Integration perspective, open Job Designs, then right-click Standard and select Create job from templates in the drop-down list. A Job creation wizard displays to help you defining the new Job main properties
    Job creation wizard.
  2. Select the Simple Template option and click Next to open a new view on the wizard.
    Job creation wizard.
  3. Enter the relevant information according to the following:
    Field Description
    Name Enter a name for your new Job. A message comes up if you enter prohibited characters.
    Purpose Enter the Job purpose or any useful information regarding the Job use.
    Description Enter a description, if need be, for the created Job.
    Author The Author field is read-only as it shows by default the current user login.
    Locker The Locker field is read-only as it shows by default the current lock.
    Version The Version is read-only. You can manually increment the version using the M and m buttons. For more information, see Managing Job and Route versions.
    Status You can define the status of a Job in your preferences. By default none is defined. To define them, go to Window > Preferences > Talend > Status.
    Path Select the folder in which the Job will be created.
  4. Once you filled in the Job information, click Next to validate and open a new view on the wizard.
    Job creation wizard.
  5. Select the template you want to use to create your Job and click Next.
    Job creation wizard.
  6. In the Type Selection area, select from the drop-down list the input file to use, tFileInputDelimited for example.
  7. In the Main properties of the component area, click the [...] button and browse to the file you want to use the properties of. The file should be centralized in the Repository tree view. The fields that follow in the Detail settings area are filled automatically with the properties of the selected file. Alternatively, you can set manually the file path and all properties fields in the Detail setting area, if needed.
    Then, click Next to validate and open a new view on the wizard.
    Job creation wizard.
  8. In the Metadata area, click the three-dot button to open the Repository Content dialog box and select the schema. Alternatively, you can use the toolbar to import it or add columns manually. Then, click Next to validate and open a new view on the wizard.
    Job creation wizard.
  9. In the Type Selection area, select the output database type from the drop-down list.
  10. In the Main properties of the component area, click the three-dot button and browse to the connection you want to use the properties of. The Database connection should be centralized in the Repository tree view. The fields that follow in the Detail settings area are filled automatically with the properties of the selected connection. Alternatively, you can set manually the database details and all properties fields in the Detail setting area, if needed.
    Then, click Finish to close the wizard.
    The ready-to-run Job is created and listed under the Job Designs node in the Repository tree view.
    Design workspace.

Results

Once the Job is created, you can modify the properties of each of the components in the Job according to your needs.

Outputting data from one database table to another

About this task

You can use different templates to create a Job that writes data from a database table to another database table or from a database table to a file.

To output data from one database table to another database table, do the following:

Procedure

  1. In the Repository tree view of the Integration perspective, right-click Job Designs and select Create job from templates in the drop-down list. A Job creation wizard displays to help you defining the new Job main properties
    Job creation wizard.
  2. Select the From Table List option and click Next to open a new view on the wizard.
    Job creation wizard.
  3. Select the template you want to use to create your Job and click Next, TableToTable in this example.
    Job creation wizard.
  4. In the Main properties of the component area, click the [...] button and browse to the connection you want to use the properties of. The database connection should be centralized in the Repository tree view. The fields that follow in the Detail settings area are filled automatically with the properties of the selected database table. Alternatively, you can manually set the database parameters in the Detail setting area, if needed.
    Then, click Next to validate and open a new view on the wizard.
    Job creation wizard.
  5. In the Select Schema to create area, select the check box of the table you want to use and click Next to validate and open a new view on the wizard. Then, click Next to validate and open a new view on the wizard.
    Job creation wizard.
  6. In the Type Selection area, select the output database type from the drop-down list.
  7. In the Main properties of the component area, click the three-dot button and browse to the connection you want to use the properties of. The Database connection should be centralized in the Repository tree view. The fields that follow in the Detail settings area are filled automatically with the properties of the selected connection. Alternatively,you can manually set the output database details and all properties fields in the Detail setting area, if needed.
    Then, click Next to validate and open a new view on the wizard.
    Job creation wizard.
  8. In the Check Availability area, select the check boxes of the available option according to your needs. In this example, we want to save the input schemas in the Repository tree view and we want to insert a tMap component between the input and output components of the created Job.
  9. In the Jobname field, enter a name for your Job, and click the check button to verify that the name chosen for your Job is available. A dialog box opens and informs you whether the Job name is available. Click Ok to close the dialog box.
  10. Click Finish to validate and close the wizard. The ready-to-run Job is created and listed under the Job Designs node in the Repository tree view.
    Design workspace.

Results

Once the Job is created, you can modify the properties of each of the components in the Job according to your needs.

Outputting data from a file to a Joblet in a specific format

About this task

This template allows you to create a Job that retrieves data from a file and writes this data into a Joblet in a specific format.

Information noteNote:

The target Joblet you want to write data in must already exist and the metadata to be read have been created in the centralized repository when using the template.

To output data from a file to a Joblet, do the following:

Procedure

  1. In the Repository tree view of the Integration perspective, right-click Job Designs and select Create job from templates in the drop-down list. A Job creation wizard displays to help you defining the new Job main properties
    Job creation wizard.
  2. Select the Migrate data from file to joblet option and click Next to open a new view on the wizard.
    Job creation wizard.
  3. Select the FileToJoblet template to create your Job and click Next.
    Job creation wizard.
  4. In the Select Schema to create area, select the metadata you want to use as parameters to retrieve and write the data into the target Joblet.
    This example uses a CSV file.
  5. Click Next to proceed.
    Job creation wizard.
  6. In the Type Selection area, select the target Joblet you want to write the retrieved data in, and click Next to validate and open a new view on the wizard.
    Job creation wizard.
  7. In the Jobname field, type in what you want to add to complete the Job name. By default, the Job name is Job_{CURRENT_TABLE}, type in example to complete this name as Job_example_{CURRENT_TABLE}, and click check button to see whether the Job name to be used already exists or not. If it exists, you need type in another Job name in the Jobname field. If it does not, a Success dialog box pops up to prompt you to continue. Click OK.
    Information noteWarning: Do not replace or delete {CURRENT_TABLE} when you type in texts to complete the Job name.
  8. Select the Create subJobs in a single job check box if you have selected several metadata files to retrieve and write data in the target Joblet and meanwhile, you want to handle these files using subJobs in a single Job.
    Keep this check box cleared if you want to handle these files in several separate Jobs.

Results

Once the Job is created, you can modify the properties of each of the components in the Job according to your needs.

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!