I am doing data load from txt file into table, most of the loads are working. Some load errors out.
- I want to save the output of the load into a log file to verify later.
- I have HTML and special characters stored in txt file and loading into table column that is been error out -ERROR 1300 (HY000): Invalid utf8mb4 character string.
Sample code inside the SQL file
LOAD DATA INFILE 'folder_Load/tbl_1.txt' INTO TABLE tbl_1 FIELDS TERMINATED BY '|' ENCLOSED BY '';
Output from CMD:
mysql> source G:/Load_Script/MYSQL_Load_Script.sql; Query OK, 24 rows affected, 222 warnings (0.03 sec) Records: 24 Deleted: 0 Skipped: 0 Warnings: 222
Query OK, 879437 rows affected, 65535 warnings (1 min 23.39 sec) Records: 879437 Deleted: 0 Skipped: 0 Warnings: 55370493
ERROR 1300 (HY000): Invalid utf8mb4 character string: 'I have performed a left knee intra-articular steroid injection u' ERROR 1300 (HY000): Invalid utf8mb4 character string: ' <input type="text" id="txtMissed" onchange="txtMe(th' Query OK, 427058 rows affected, 65535 warnings (1 min 15.00 sec) Records: 427058 Deleted: 0 Skipped: 0 Warnings: 49934240