You are on page 1of 12

Al Akhwayn University in Ifrane School of Science & Engineering CSC 5301 Fall 2012

Mohamed Ennahdi El Idrissi

Plain Transformation Demonstration [Pentaho's KETTLE]

Getting Started: Download pentaho data integration too (Kettle) from the following link: http://kettle.pentaho.com/ Once downloaded, execute Spoon.bat (for windows users):

To "Extract" data from a data source to a destination:

Our input is an excel file:

double clicking on the icon to determine which file is involved in this "transformation":

After selecting a file, you should "add" it:

Once added, go to !Fields to retrieve the structure of the input:

Now, we select the output of for this operation:

Our output in this case would be SQL script (inserts):

Now, we configure each step, one by one: we specify which table, after mapping to a DB connection), in our case, we are using MySQL.

We consider the case of product, to map what is in the excel file and what is going to be exported to the SQL script file (inserts). To map columns in the excel files with DSAStore-Product table, we do:

With a right click on the step on which we are working, we choose "Generate Mapping against This Target Step":

This step yields an element (PRODUCT Mapping) in the board:

This mapping should be placed accordingly:

This mapping step is hence placed between the input and the output:

Now that mapping has been established, all the rows of the Product ID and Product Description in the input will be generated in an .sql file under insert into format.

To launch the transformation:

Then press Launch:

The statistical result:

And the generated SQL files:

Product.sql

Vendor.sql

You might also like