MySQL truncating text while loading data into table

51 Views Asked by At

I've tried to load sentences from CSV file that seems to have tab delimited columns. But as I can see there are some problem, sentences are loaded cut off and hase ellipsis (...) at the end. In the CVS there are longer.

enter image description here

enter image description here

I am using standard LOAD DATA

LOAD DATA LOCAL INFILE "sentences.csv" INTO TABLE sentences CHARACTER SET UTF8 COLUMNS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '"'

for sentence column I've used both TEXT and VARCHAR(15000) it is utf8mb4_unicode_ci COLLATION

For example I have such sentence

11026408    eng The Stevens family, however, continued to work at the subject, and by 1841 had determined by actual experiment the thickness of wrought-iron armour which was proof against the projectiles then in use.

loaded as The Stevens family, however, continued to work at ...

1

There are 1 best solutions below

0
Michał Ziobro On

Ok as @Charchit Kappor well pointed out it is issue with displaying data in phpmyadmin. But this data are still completely stored in database and can be queried from Terminal.

mysql> SELECT sentence FROM sentences WHERE id = 11026408;

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| sentence                                                                                                                                                                                                 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| The Stevens family, however, continued to work at the subject, and by 1841 had determined by actual experiment the thickness of wrought-iron armour which was proof against the projectiles then in use. |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (3.67 sec)