Load Excel Data into Database in Talend

In this Talend chapter, we show how to load excel data into Database table. In Talend, you can load excel file into database table in two ways.

  • Drag and drop the tFileInputExcel and browse the Excel file, and create a schema for it.
  • Creating metadata and use that existing Excel metadata.

In this example, we use the already existing metadata as the Excel source. The following image shows the Excel file data.

Load Excel Data into Database in Talend 0

First, drag and drop the ExcelData from the File Excel folder into the Talend Job design.

Load Excel Data into Database in Talend 1

Next, drag and drop the tDBOutput from Palette to design space. Here, you can also choose the DB Specific output. However, to show the universal option, we have selected the tDBOutput.

Load Excel Data into Database in Talend 2

Within the Components tab, whether you can choose the connection settings or select the connection from the repository.

Load Excel Data into Database in Talend 3

First, we selected the Microsoft SQL Server as the Database and clicked the Apply button. Next, connected the ExcelData row to DBOutput. Then, we used the existing connection.

Here, we are using the Talend_ExcelData as the destination SQL table name. And we are creating this table if it does not exist.

Load Excel Data into Database in Talend 4

By clicking the Edict Schema button, please check the schema of input an output before running the job.

Load Excel Data into Database in Talend 5

We changed the Lengths of each column so that they can accommodate for universal inputs.

Load Excel Data into Database in Talend 6

Please check all the Talend settings before loading excel data into Database.

Load Excel Data into Database in Talend 7

Let us run the job.

Load Excel Data into Database in Talend 8

Let me open the SQL Management Studio and check whether the Talend job loaded the excel data into Database.

Load Excel Data into Database in Talend 9