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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in the component's properties:Type mismatch: cannot convert from char to String

I don't have any idea, why I got this error while I'm trying to load the data to the table.

The source file having values "A" and should have the same value on the target table.

 

The data types that I used for both source and destination table is CHAR(1).

Is there any way to fix this? I tried to search, but cannot find, how to fix char to string.

Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hello,

Did you match data types when load the data to the table? Could you please show us your component setting screenshot?

Best regards

Sabrina

Anonymous
Not applicable
Author

Here's the screenshot of the component.

 

0683p000009M0rX.pngMy data sample is like below:

 

1|IN00000010|012004|ABC|All Military Sample Sample |Sample Choice Choice|115 Neo Street|New York|NY|8000|FSC|Y|Y|Y|A|012006|012009|A|2499

 

And I'm getting error on those Y,Y,Y,A and the last A before the last values.

Anonymous
Not applicable
Author

Yes, I have match the data types when I'm trying to load the data to the table

Anonymous
Not applicable
Author

Hi,

 

     You have specified that you are trying to load the data to a database. But in the component screenshot, you hae shown the screenshot of a csv file input/output component.

 

     Also the schema you have mentioned from repository in that file component is from a MySQL schema. The issue could be due to these mismatches. 

 

     If you are looking to read/write to DB, you should always use DB components of Talend and not file components. Another common mistake by programmers is to remove the padding spaces from string before writing to DB.

 

      Could you please check these details and let us know whether they have helped to resolve your issue? If the issue has been resolved please make it as a habit to mark the topic as resolved for helping fellow community members. Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi