Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created a MySql table using talend. And with tfileInputDelimited palette, i tried to copy the data present in csv filoe to the table in data base.
While runnung the job, am getting Data truncation: Data too long for column 'First' at row 1
Please help me in resolving the issue. I am still at learning phase.
Please find the screenshots attached for more details.
Thank u.
Redirect the output to a tLogRow component with "Table" option ticked and share the result printed on the console
Hello,
Please provide the Table Db structure. In your case I guess you didn't mention the size of the columns. Verify thoroughly the length of your table columns and try to process single record first and let us know. You can even keep the tLogRow Component in between and execute for knowing the execution process.
Thanks,
Hameed
when i used the tlogrow the below output came:
[statistics] connecting to socket on port 3920
[statistics] connected
Data truncation: Data too long for column 'First' at row 1
.-----------------------------+----+------+----+-----.
| tLogRow_1 |
|=----------------------------+----+------+----+----=|
|First |Last|Number|City|State|
|=----------------------------+----+------+----+----=|
|vamsi,krishna,11,cittoor,ap |null|null |null|null |
|amit,sharma,22,bangalore,ka |null|null |null|null |
|sachin,tendulkar,33,mumbai,mh|null|null |null|null |
'-----------------------------+----+------+----+-----'
[statistics] disconnected
Job CreateTable ended at 17:41 20/03/2018. [exit code=0]
I tried in both ways. I tried with mentioning column size and also without size.
Thank u TRF
By using tlogrow, i understood the problem. That is, first column is taking the entire data of remaining 4 columns. But am unable to solve the issue.
Help me
when i put "," in field separator, i got the output as:
[statistics] connecting to socket on port 3849
[statistics] connected
Data truncation: Data too long for column 'First' at row 1
.------+---------+------+---------+-----.
| tLogRow_1 |
|=-----+---------+------+---------+----=|
|First |Last |Number|City |State|
|=-----+---------+------+---------+----=|
|vamsi |krishna |11 |cittoor |ap |
|amit |sharma |22 |bangalore|ka |
|sachin|tendulkar|33 |mumbai |mh |
'------+---------+------+---------+-----'
[statistics] disconnected
Job CreateTable ended at 18:28 20/03/2018. [exit code=0]
but failed to insert the data in database.
Check the Create Table Component. You might have missed mentioning the column sizes.
Try to run the Job in debug mode
Thanks,
Hameed
OK, now your job seems ok but you probably have a problem with the table definition.
Check this part.
problem found in table definition
thanks hammed