Help Center> Cloud Data Migration> FAQs> Troubleshooting> What Should I Do If Error Message "For input string: "false" Is Displayed During Field Type Conversion During MySQL-to-DLI Migration?
Updated on 2023-06-21 GMT+08:00

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

  1. 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.

  2. 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.

Troubleshooting FAQs

more