[resolved] tMap Output Order not working correctly?

One Star

[resolved] tMap Output Order not working correctly?

Hi, I have a tMap component with two outputs. The first needs to write to a parent table in a database, and the second needs to write to a child table. I have the order of the outputs set so the parent table output is first, and the child is second, but the child output is always executing first (see screen shot). The output with Order 2 is processing while the output with Order 1 is still Starting. Can anyone suggest why this is happening?
Thanks!

Accepted Solutions
Seven Stars

Re: [resolved] tMap Output Order not working correctly?

The order of tMap outputs only has an effect if the input row generates a row on both outputs; otherwise, output rows are generated from the input rows as they are processed, subject to the filter expressions. It also affects which flow is finalised first and therefore which OnComponentOK trigger will be fired first (if both output components have one).

All Replies
Community Manager

Re: [resolved] tMap Output Order not working correctly?

Hi
There is no order among all the output tables of tMap, in order to make the output to be executed one by one, you should output them to temp file or memory, and then read them and insert into database in different subjob linked by OnSubjobOK
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Seven Stars

Re: [resolved] tMap Output Order not working correctly?

The order of tMap outputs only has an effect if the input row generates a row on both outputs; otherwise, output rows are generated from the input rows as they are processed, subject to the filter expressions. It also affects which flow is finalised first and therefore which OnComponentOK trigger will be fired first (if both output components have one).
One Star

Re: [resolved] tMap Output Order not working correctly?

Thank you both for your quick replies, it's very helpful to understand how this feature of tMap works!