In PDI Spoon, I imported data from Excel spreadsheet and exported into the Database. Which then resulted the error of
Conversion from collation utf8mb4_0900_ai_ci into latin1_swedish_ci impossible for parameter.
I've tried using Modified JavaScript Value step to remove non-ASCII characters
field_name = field_name.toString().replace(/[^\x00-\x7F]/g, "");
I have also tried to use the Select Value step to change the encoding to ISO-8859-1
Both doesn't work and shows the same error. Any other methods or solutions that I can implement within PDI Spoon (by not configuring the settings of DB)?
My current database collation settings are as below
- Driver: MySQL
- Engine InnoDB
- Default Charset: utf8mb4
- Default Collation: utf8mb4_0900_ai_ci
However, all tables in the database have the Default Charset of latin1. Which makes all varchar encoding as latin1.