What Should I Do If Error Message "For input string: "false" Is Displayed During Field Type Conversion During MySQL-to-DLI Migration?
Symptom
The following error is reported during MySQL-to-DLI migration: java.lang.NumberFormatException: For input string: "false".
Fault Analysis
- An error may occur when the boolean type whose value is "false" is converted to the int type. Check the mapping on the Map Field page.
- According to the field mapping analysis in the previous step, the source field support_gpu_instancing is of the TINYINT type, and its value is 0 or 1. However, the actual value should be false or true. An error is reported when fields of the int type are migrated to the destination, indicating that the type conversion is incorrect. This is because MySQL automatically identifies and converts 0 or 1 to false or true.
Solution
To resolve this issue, use either of the following methods:
- Modify the table creation statement at the destination and change int type to boolean type.
- Change the value of mysql.bool.type.transform to false for the source MySQL database.
For the second method:
You can add parameter mysql.bool.type.transform and set its value to false in the advanced attributes of the MySQL connector.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot