Author Topic: How to Combine Excel Workbook together With tUnite Component in Talend  (Read 51 times)

0 Members and 1 Guest are viewing this topic.

Offline nomadic

  • Full Member
  • *
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Sharing this guys to you...
Tutorial : How to Combine Excel Workbook together With tUnite Component in Talend

In this scenario we are combining several excel workbook or sheets inside the workbook by using tUnite component .

There are two xlsx files one contain the data of France countries with 2 rows and another file contains the data of Mexico countries with 3 rows .tUnite component will merge both the files and get the data of both the countries with output containing 5 rows.

This job will read both the files from tFileInputExcel.

Combine the files with tUnite component.


tUnite component is used to merge data from various sources, based on a common schema.
For the tUnite component you need to match the schema.

This is the Excel workbook consisting of different sheets France.xlsx,Mexico.xlsx.

 

This is France data:--

Customer_ID|Customer_First_Name|Customer_Last_Name|Customer_Address|Customer_City| Customer_PostalCode|Customer_Country|RegisterDate
7|Justin|Ash|90 Ruapehu Road   Ohakune |Strasbourg|67000|France|1/13/2010
9|David|French|Williamstown Road|Marseille|45668|France|3/16/2000

This is Mexico data:--

Customer_ID|Customer_First_Name|Customer_Last_Name|Customer_Address|Customer_City| Customer_PostalCode|Customer_Country|RegisterDate
2|William|Hinkle|543 ANJOU ANJOU H1K 2P4|Mexico|71450|Mexico|10/4/2007
3|Nick|Petrakis|40  Toronto M8Z 3Z7|Mexico|48577|Mexico|3/16/2000
13|George|Loomis|16 Martel   Beloeil|Mexico|43256|Mexico|1/13/2010

Drag and drop the tFileInputExcel ,tUnite and tLogRow component from the palette.
Connect each component as shown in the below screenshot.



Open the component properties of France[tFileInputExcel_1] and Mexico[tFileInputExcel_2].In both tFileInputExcel do the same process.
Tick the box of Read excel 2007 file format.
In the File name/Stream tab provide the path of the file where you have stored the file.
To apply header to each sheet tick the box of Affect each sheet(header&footer).
Tick the checkbox of Die on error so that if there is any error while processing the file then it will stop the job.

 

Open the component properties of tUnite .
Here provide the same schema of France country .Simply drag and drop the schema.



In the Basic settings view of tLogRow, select the Basic option or tou can select Table option to display properly the output values.

Run the job.
Your output will look like below containing the data of both the countries France and Mexico with total 5 rows.

Starting job tunite at 13:51 17/06/2015.

[statistics] connecting to socket on port 3662
[statistics] connected
Customer_ID Customer_First_Name Customer_Last_Name Customer_Address Customer_City Customer_PostalCode Customer_Country RegisterDate
7|Justin|Ash|90 Ruapehu Road   Ohakune |Strasbourg|67000|France|1/13/2010
9|David|French|Williamstown Road|Marseille|45668|France|3/16/2000
2|William|Hinkle|543 ANJOU ANJOU H1K 2P4|Mexico|71450|Mexico|10/4/2007
3|Nick|Petrakis|40  Toronto M8Z 3Z7|Mexico|48577|Mexico|3/16/2000
13|George|Loomis|16 Martel   Beloeil|Mexico|43256|Mexico|1/13/2010
[statistics] disconnected
Job tunite ended at 13:51 17/06/2015. [exit code=0]

Techronnati | where technology never sleeps


Mountain View

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
133 Views
Last post October 25, 2008, 08:51:10 AM
by Corps
0 Replies
100 Views
Last post December 12, 2008, 06:03:44 AM
by CyborgRepublic
2 Replies
137 Views
Last post April 27, 2017, 09:34:46 AM
by JusticeLeague
0 Replies
68 Views
Last post March 03, 2015, 06:55:50 AM
by JusticeLeague
0 Replies
54 Views
Last post February 26, 2016, 01:52:11 AM
by Corps

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.