I have a flow GetFile->ConvertRecord->splittext->PutdatabaseRecord. My csv file I am sending in to the GetFile contains followings fields:
ID TIME M00B01 M00B02 M00B03
1 2018-09-27 10:44:23.972 3242 35 335
2 2018-09-21 11:44:23.972 323 24 978
MY database table skeleton in MYSQL is as follows:
Create table test(ID INT,TIME DATETIME(3),MxB01 INT,MxB02 INT,MxB03 INT);
Note: I have replaced the name of headers as MxB00,MxB01 etc..
I have error in my convertRecord processor as I am reading as CSVReader And writting as CSVSetWritter. I am attaching the config of both for your reference.
The problem is It reads the CSV file but because of change in header names it gives all other fields as blank(i changed the header names because I have to write the headers name as MxB00 in order to match the headers defined in MySQL table). I get the value of ID and Time because I have not changed the Header name of those fields in the CSVWritter and MySQL table definition. so those values I get but for other values I get blank Because it is getting confused due to name change.
How can I solve this problem? Any help is much appreciated.Thank you!




