If one has a CSV file with the following content

id,name,dob,addr1,addr2,city,state,country
1,Joe Smith,04/23/1971,121 Main Street,San Mateo,CA,USA
2,Bill Williams,09/21/2008,43 Overlook St,San Mateo,CA, USA

and one simply wants to run a LOAD CSV command to have the column headers returned, the following should suffice

load csv with headers from 'file:///test.csv' as row with row limit 1 return keys(row);

which will return output similar to

+---------------------------------------------------------------------+
| keys(row)                                                           |
+---------------------------------------------------------------------+
| ["country", "addr2", "city", "addr1", "dob", "name", "state", "id"] |
+---------------------------------------------------------------------+

Details


Author:
Dana Canzano
Applicable versions:
3.4, 3.5
Keywords:
headersLoad CSVneo4j-3.4neo4j-3.5