How to merge two tables

One Star

How to merge two tables

Hi,

 

I'm new in talend. I have a very urgent problem. So, i wanna merge two tables. For example:

Table T1 with columns A, B, C, D and n1 rows

Table T2 with columns A, B, E, F and n2 rows.

Ps: My tables T1 and T2 have not the same numbers of rows (n1>n2).

A: nominal

B: Date column

C, D, E and F are integers columns.

 

I would like to have a final table T with columns A, B, C , D, E, F and if the values of colums A, B in table with less rows (T2) are not in the second table (T1) to replace the values of the two next columns (E, F) by sero.

 

 

Thanks in advance for your help.

 

Best regards

 

 

Moderator

Re: How to merge two tables

Hello,

With your requirement, could you please have a look at tMap component in talend?

Here are related articles about:TalendHelpCenter:tMap and TalendHelpCenter:tMap scenarios.

Let us know if it is OK with you.

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.
Forteen Stars

Re: How to merge two tables

@medfand,read the two tables and take two tmap and create a required columns in first tmap with default values E,F and second one with C,D and connect two tmaps to tUnite and then connect tUnite to table output.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: How to merge two tables

@medfand,still do you have issue?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

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