A Simple Talend Job - Overriding a Context

Preliminary notes

This use case can be reproduced with both Talend Open Studio and Talend Integration Suite.
This use case relies on the use case "A Simple Talend Job".

Rationale

Execute a Talend job into Petals and passing it parameters that are natively supported by the job..
The job is exposed as a service into Petals. When this service is called, the job reads the native options and is executed.
Be careful, this is not the recommended way to pass information to a job. It is presented only to show what can be done.

The input message provides the value of a context using the native parameter-passing way of Talend jobs.
Only the job's result is expected in the response.

Creating and exporting the job

The job to be executed performs the following actions:

  1. The job loads the context variable. If the variable name is not recognized, then the default value will be used.
  2. The job connects to a database.
  3. It retrieves the content of a table.
  4. It serializes part of the extracted data as a CSV file on the disk.

This job has one context variable, which indicates the location of the CSV file.
In the scope of this use case, it is assumed there is a database "formationtalend" on the localhost, having a table named customers.
The schema of the customers table includes two columns named "CustomerName" and CustomerAddress, both being of type varchar(255).

Creating the job

The job creation is detailled in the use case "A Simple Talend Job".
There is no difference.

Exporting the job

The job export is detailled in the use case "A Simple Talend Job".
There is no difference.

Deploying and testing in Petals

Looking at the created archive

The created archive is a Petals service assembly.
More details are available in the documentation of the petals-SE-Talend.

What must be taken care of is the jbi.xml and the WSDL files available in the service-unit.
If you open the created archive, it contains another archive. This second archive contains a jbi.xml file.

The WSDL file exposes no parameter.
The possible input parameters are:

Deploying and testing this new service

SoapUI is used for this test...

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.