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.
First, drag and drop the ExcelData from the File Excel folder into the Talend Job design.
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.
Within the Components tab, whether you can choose the connection settings or select the connection from the repository.
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.
By clicking the Edict Schema button, please check the schema of input an output before running the job.
We changed the Lengths of each column so that they can accommodate for universal inputs.
Please check all the Talend settings before loading excel data into Database.
Let us run the job.
Let me open the SQL Management Studio and check whether the Talend job loaded the excel data into Database.