Data Flow - From Petals to a Job using a tPetalsInput

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (18)

View Page History
The job to be executed performs the following actions:
# The job is passed the data flow coming from Petals.
# The job connects to a database and writes the data flow in this database. If the target table does not exist, it is created.

This job has no context variable.
h2. Creating the job

The job is made up of three two components:
# The tPetalsInput transforms the Petals' data flow into a Talend flow.
# The tMap transforms the Petals input into data that can be directly inserted into the database.
# The tMySqlOutput writes the data into the database.

Here is the overall aspect of the job.
!PetalsToJob_tpi_job_2.jpg!

\\
Here is the schema of the tPetalsInput component.

!PetalsToJob_tpi_tpischema_2.jpg!

\\
Here is the schema of the tMySqlOutput tPetalsInput component.

!PetalsToJob_tpi_msoschema_2.jpg!

\\
Here And here are the properties of the tPetalsInput component.

!PetalsToJob_tpi_msoproperties_2.jpg!

\\
Eventually, here is the schema and the transformation editor of the tMap component.

!PetalsToJob_tpi_tmaped2.jpg|thumbnail!



h2. Exporting the job

<xs:complexType name="inRow">
<xs:sequence>
<xs:element name="id" type="xs:integer" /> <xs:element name="name" type="xs:string" />
<xs:element name="address" type="xs:string" nillable="true" />
<xs:element name="registerTime" type="xs:long" nillable="true" />
<!--Zero or more repetitions:-->
<tal:in-data-bean>
<tal:id>0</tal:id>
<tal:name>Roger</tal:name>
<tal:address>17, rue de la république</tal:address>
<tal:registerTime>0</tal:registerTime>
</tal:in-data-bean>
<tal:in-data-bean>
<tal:id>1</tal:id>
<tal:name>Louis</tal:name>
<tal:address>1, avenue H. de Balzac</tal:address>
If the job execution fails, the 0 is replaced by another integer, e.g. 1.
One failure reason can be, as an example, that the database is not started.
Job errors generally result in an exception being displayed into the Petals console.

To Otherwise, to determine the act cause of a problem, you would have to use logging features available in the Talend palet.
However, let's make it clear, the job's logs are managed independently of Petals and its monitoring capabilities.