Import csv with 2 pairs of locations coordinates in QGIS

What I have: A csv-table with two pairs of lat/long. QGIS can import only one pair – except when the two pairs of coordinates are reshaped to WKT, Well Known Text.

A new colum named wkt is needed.

LINESTRING(long1 lat1, lat2 long2)


first_row, wkt
1,LINESTRING(51.210021 6.786209,6.786209 51.213942)
2,LINESTRING(51.213942 6.761064,6.761064 51.270831)

First choose wkt when importing, then line – and done.