tJoin or tMap when joining multiple files?

tJoin or tMap when joining multiple files?

Hello,
I have a job in which I have to join four files on the same key and then use a tMap to generate several data flows. I heard that when possible, we should avoid to use the tMap and use an equivalent component.
In terms of performance, is it better to join the files before the tMap with 4 tJoin components, or is it equivalent to join all four files inside the tMap?
Thanks,
Seventeen Stars

Re: tJoin or tMap when joining multiple files?

Where do you heard avoid using a tMap? The tMap joins are very fast and flexible.
Moderator

Re: tJoin or tMap when joining multiple files?

Hi,
I think the related forum will be useful for you Forum 29197:tJoin Vs tMap to understand the usage of this two components.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: tJoin or tMap when joining multiple files?

jlolling, in a Talend presentation we were told that tMap is a heavy component, hence should be avoided when we could use a simpler component instead.
xdshi, thank you for the link to the discussion. It is indeed useful, but the comparison concerns only functionality while I am concerned only about performances: as the joins are basic, I can use either 4 tJoins or 1 tMap, which solution is faster?
Moderator

Re: tJoin or tMap when joining multiple files?

Hi,
Usually, the function of tJoin is joining two tables by doing an exact match on several columns. It compares columns from the main flow with reference columns from the lookup flow and outputs the main flow data and/or the rejected data.
tMap is buffer component which takes processing(lookup) in memory if you don't set basic configuration of storing temporary data on disk.
For a large set of data, try to store the data on disk instead of memory to avoid "outOfMemory" exception.
See the online related article TalendHelpCenter:Exception outOfMemory.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.