mysqlimport or LOAD DATA INFILE with Multipoint datatype

174 Views Asked by At

I have a column in a table that has type multipoint. How do I structure the data in my file to either use mysqlimport or the LOAD DATA INFILE construct to import this file?

Right now my data is in a plaintext json-formatted file (not in a database) and I would like to structure it to be compatible for import.

I am using MariaDB 15.1

1

There are 1 best solutions below

2
On

Probably this is all you need:

mysqldump --hex-blob ...

A subsequent reload using mysql should be able to exactly reconstruct the data.

LOAD DATA would need some extra code to deal with the conversion -- either geomFromText or unhex. That should be possible; do you prefer LOAD DATA?