[resolved] Connect multiple DB inputs to tmap component

Highlighted
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
Highlighted
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

View solution in original post


All Replies
Highlighted
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. 
Highlighted
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
Highlighted
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

View solution in original post

Highlighted
One Star

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

Oh I see, thanks !
Highlighted
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
Highlighted
Two Stars

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

I am having the same problem you have. I have read the same direction but still have trouble connecting multiple DB inputs with the tmap component.
Connect with mobdroportugal

Highlighted
Moderator

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

Since orgin is one so which you cannot connect,since you need to use thashputput and thasinput component to over come this issue.
Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

2019 GARTNER 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

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