Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

"Data truncation: Data too long for column" causes

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.

Labels (2)
24 Replies
Anonymous
Not applicable
Author

Please find the attachment for schema.


Screenshot (46).png
Screenshot (47).png
TRF
Champion II
Champion II

Redirect the output to a tLogRow component with "Table" option ticked and share the result printed on the console

hami1
Creator
Creator

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

Anonymous
Not applicable
Author

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]

Anonymous
Not applicable
Author

I tried in both ways. I tried with mentioning column size and also without size.

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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.

hami1
Creator
Creator

Check the Create Table Component. You might have missed mentioning the column sizes.

Try to run the Job in debug mode

Thanks,

Hameed

TRF
Champion II
Champion II

OK, now your job seems ok but you probably have a problem with the table definition.

Check this part.

Anonymous
Not applicable
Author

problem found in table definition

thanks hammed