[resolved] Connect multiple DB inputs to tmap component

One Star

[resolved] Connect multiple DB inputs to tmap component

Hi,
I currently have two databases (one on oracle and one on a mssql server), and I want to connect two inputs (one table from each DB) to a tmap component, but for some reason I can only connect one... (I have already seen the tutorial for tmap, did I miss something ?)
Here is a screenshot of my job :

I want to connect both inputs to the tmap, is there a way to do so ?
Thanks in advance for your time ! Smiley Happy
Thomas

Accepted Solutions
Ten Stars

Re: [resolved] Connect multiple DB inputs to tmap component

You can use more than one connection component. It is to do with how you have them linked using the "OnSubJobOK" links. In your job, you should have your components connected as below ....
ConnectionSMI --OnSubJobOK--> ConnectionOracle --OnSubJobOK-->HISTOTOX--row-->tMap <--row---ALIZES

All Replies
Ten Stars

Re: [resolved] Connect multiple DB inputs to tmap component

A tMap has a concept of a "main" data input and "lookup" inputs. You need to decide which is your "main" input and disconnect the "lookup" from its "OnSubJobOK". Then connect the tMap to the "main" input first. Afterwards connect up the "lookup" input. 
One Star

Re: [resolved] Connect multiple DB inputs to tmap component

I see.. It's working now, but only because I deleted both connection components, so I can't use an "existing connection" to my inputs now, I have to write manually the connection data.. 
I can indeed keep both connection components, but if it is not linked to something, I may have a nullpointerexception when I'd launch the executable generated from the job. But since I only have 2 inputs it's ok..
Anyway, thank you very much for the help, I'll set this topic as resolved. Smiley Happy
Thomas
Ten Stars

Re: [resolved] Connect multiple DB inputs to tmap component

You can use more than one connection component. It is to do with how you have them linked using the "OnSubJobOK" links. In your job, you should have your components connected as below ....
ConnectionSMI --OnSubJobOK--> ConnectionOracle --OnSubJobOK-->HISTOTOX--row-->tMap <--row---ALIZES
One Star

Re: [resolved] Connect multiple DB inputs to tmap component

Oh I see, thanks !
One Star

Re: [resolved] Connect multiple DB inputs to tmap component

Hi,
I have the same issue, but the difference is, I need a subjob ok to prevent the connection kicking before the context variables loads.  As a result, the connection is trying to connect before the context variables load.  Any help would be appreciated.
Thanks
David

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