How to import POINT from CSV


Is there a way how to import a point type directly from CSV representation?

I implemented a conversion tool to convert NYC Taxi Rides to INSERT statements and execute those 1 by 1 (the etl tool I used Talend cannot do better by default with MapD JDBC driver as its unknown and some functions like batching are not available). So I got idea I will merge long/lat from CSV into other CSV in form of POINT which I will import via command line mapdql.

Is there any way?


Or I am thinking that I will use Kafka as man in the middle. So I don’t need to mess around, I realized by docs that geo data are supported to be imported from shp, .geojson, .kml files… so maybe pushing and consuming from kafka is better in my case, for speed up.

Ok, I answered my own question :-))


If you have a csv with lan/lot you can import them with the copy command without needing any transformation.

Take a look to the @veda.shankar blog


thx @aznable - will just point out the important message:

Now we’ll create a table with a single POINT column which includes the information from the two columns as longitude (x) and latitude (y). By default when the table importer finds scalar values in the CSV row for a POINT column, it consumes two consecutive columns as longitude and latitude. If the order of the coordinates in the CSV file is opposite (latitude, longitude), then load the data using the WITH option lonlat=‘false’ .