Now I've created one job to load data from CSV to MySql database. The data type from csv is not match to mysql table data type, so I need to change data type. Then I use tConvertType but I got null or error after running the job.
I work around with configuration in tConvertType and tMap but it doesn't work. For example there is phone number in csv with integer data type but i have to convert to string before loading to mysql database. could anyone please give me the sample job like this.
For the telephone number you can simply set the column for the file import component (I assume you are using a tFileInputDelimited) to String.
With regard to the errors you were getting, could you post them?
use this string.valueof(row1.phonenumber), or else in the csv while writing metadata, you can change to string instead of using integer, this both of the solutions will work
This will not work. If a telephone number such as 07555123456 is read as a number by the tFileInputDelimited, then the leading zero will be removed and you will end up with 7555123456. The telephone number must be read as a String from the beginning.
Watch the recorded webinar!
Create systems and workflow to manage clean data ingestion and data transformation.
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.