Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_2583
Contributor III
Contributor III

Create an output based on 2 DBinputs

Hi,

I have 2 databases and what I need is the following.

 

Database_One will have these fields:

acc_no

comp_id

td_number

comp_amount

acc_amount

 

Database_Two doesn't have all of the fields within Database_Once, just the following:

acc_no

comp_amount

acc_amount

 

 

What I want to do it take all of the fields within Database_One, join to Database_Two using acc_no and SUM the comp_amount and acc_amount from the 2 databases so the final output will have the following output:

acc_no

comp_id

td_number

comp_amount

acc_amount

 

Any idea how I could go about doing that please? I was thinking of having the 2 TDInputs to a TMap which then goes to a TDOutput, but not sure if that's quite right.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello,

For your use case and requirement, this goal can be achieved by using tDBInput components and tMap component.

The workflow should be: tDBInput(Database_One)-->tMap-->tDBOutput

tDBInput(Database_two)

Here is a KB article about: https://community.talend.com/s/article/tMap-expression-syntax-TCiHW

Hope it helps.

Best regards

Sabrina

View solution in original post

2 Replies
Anonymous
Not applicable

Hello,

For your use case and requirement, this goal can be achieved by using tDBInput components and tMap component.

The workflow should be: tDBInput(Database_One)-->tMap-->tDBOutput

tDBInput(Database_two)

Here is a KB article about: https://community.talend.com/s/article/tMap-expression-syntax-TCiHW

Hope it helps.

Best regards

Sabrina

Todd66
Contributor III
Contributor III

you can use merge join or stream look up step if both input have key like comp_amount and acc_amount