I want to import large CSV file with following columns
SegmentId;Lengthmm;RoadClass;OptimalSpeedKph;SpeedLimitKph;WKT 1;7329;1;120;70;LINESTRING (28.97845 41.067332,28.978537 41.067332) ... I am using LOAD DATA INFILE. Problem is that WKT is LINESTRING. Actually if I add one entry with following query:
INSERT INTO FCD VALUES (3,1,1,1,1,LineStringFromText( 'LINESTRING (28.947971 41.050192,28.94754 41.049887)')); It is inserted into table.
However I didn't know to access the WKT parameter in LOAD DATA INFILE command and transform it.
LOAD DATA LOCAL INFILE '/home/username/userfile.csv' INTO TABLE `FCD` FIELDS TERMINATED BY ';' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES It gives me the following error:
ERROR 1416 (22003): Cannot get geometry object from data you send to the GEOMETRY field With regards