There are so may ways to populate your CSV file into MySQL table. Today I will share how to do this task easily with Pentaho.
Previously I upload the csv file containing malaysia postcode here hence I will use this file as my sample for this tutorial.
1. Create new transformation (I’m assuming that you know how to open up this application)
2. Drag CSV file input to Transformation area
3. Double click CSV file input and Browse the source file.
Once the source file is in place, click the Get Fields button.
Name,Type,Length will auto populate based on the file contain. Change it accordingly.
4. Once the source file is ready, drag the Table Output to the transformation area.
Click both the file input and table output at the same time right click to create New Hop
5. Double click table output and create new connection.
6. Once the connection is define properly,click the SQL button
and Execute the SQL Statement to create the output table
7. Run the transformation.
8. Execution results.
9. Check the result from mysql console.
I’ve convert this tutorial into movie format. You can have a look it here. Sorry for the quality of the movie is not good.
This is my first post in year 2009. I’m expecting my work life is getting much more busier in this few months.