I loaded a CSV file into MySQL table:
load data local infile ‘xxx.csv’
into table xxx
fields terminated by ‘|’
lines terminated by ‘\n’;
Query OK, 44953961 rows affected, 65535 warnings (30 min 35.524 sec)
Records: 44953961 Deleted: 0 Skipped: 0 Warnings: 113859357
How can I view the log file containing the warnings? I tried the GCP console but that does not show me the 113859357 warnings
It just has
To view the warnings, you could use the SHOW WARNINGS Statement from MySQL.
Here is a simple example that shows data-conversion warnings for INSERT. The example assumes that strict SQL mode is disabled. With strict mode enabled, the warnings would become errors and terminate the INSERT.
mysql> CREATE TABLE t1 (a TINYINT NOT NULL, b CHAR(4));
Query OK, 0 rows affected (0.05 sec)
mysql> INSERT INTO t1 VALUES(10,'mysql'), (NULL,'test'), (300,'xyz');
Query OK, 3 rows affected, 3 warnings (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 3
mysql> SHOW WARNINGS\G
*************************** 1. row ***************************
Level: Warning
Code: 1265
Message: Data truncated for column 'b' at row 1
*************************** 2. row ***************************
Level: Warning
Code: 1048
Message: Column 'a' cannot be null
*************************** 3. row ***************************
Level: Warning
Code: 1264
Message: Out of range value for column 'a' at row 3
3 rows in set (0.00 sec)