Iterating over several subjobs.

Highlighted
One Star

Iterating over several subjobs.

I have my xml data split into several xml files I iterate over them and input them to my DB.
So I am using tFileList?Iterate?
Each of the tFileInputXML-->tXMLMap--->tMysqlSP inputs data into a different table.
This worked correctly in Talend 4.2.4 inserting data into the main table first. This order is important as there are constraints between the tables.
We have moved to Talend 5.1 and the job has stopped working inserting to table 3 first.
I have tried using on OnSubjobOk but this also fails inputting the same files data twice to the table 2 and table 3.
tMysqlConnection
|
OnSubjobOk
|
tFileList--Iterate-->tFileInputXML-->tXMLMap--->tMysqlSP(main table)
| |
| OnComponentOk
| |
| tFileInputXML-->tXMLMap--->tMysqlSP(Table 2)
| |
| OnComponentOk
| |
| tFileInputXML-->tXMLMap--->tMysqlSP(Table 3)
OnSubjobOk
|
tMysqlCommit
One Star

Re: Iterating over several subjobs.

Hi sdel,
Logically jobs looks perfectly fine.
What happens when it stops inserting into Table 3, can you please provide us some error logs and if possible screenshots as well.
--
Regards,
Vinod
Seven Stars

Re: Iterating over several subjobs.

I think the problem is using OnComponentOK from tFileInputXML. Try making the OnComponentOK from tMysqlSP.
One Star

Re: Iterating over several subjobs.

Yes connecting from the tMysqlSP worked. Thanks

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog