I'm using neo4j 2.1.2 for windows I was attempting to use Neo4j's load csv command but I get the following error...
neo4j-sh (?)$ load csv with headers "file:../test/unclaimed.csv" AS csvLine
MERGE (o:Original_Transaction_Number { value: csvLine.OTN })
MERGE (i:Institution {name: csvLine.Institution })
MERGE (i)<-[:TRANSACTION_OF]-(o)
;
SyntaxException: Invalid input 'l': expected <init> (line 1, column 1)
"load csv with headers "file:../test/unclaimed.csv" AS csvLine"
^
infact I get the same error by just entering load
neo4j-sh (?)$ load ;
==> SyntaxException: Invalid input 'l': expected <init> (line 1, column 1)
==> "load "
==> ^
Could anyone explain what's happening?
(EDIT:)->(FIXED)->(THE PROBLEM)
Combination of issues here.
I had earlier tried upgrading to 2.1.2 be simply extracting files to 2.0.3 folder - fixed - thanks @Stefan
Fixing 1. and prefixing with "cypher 2.1" (thanks @Michael) gave more informative error "SyntaxException: Invalid input '"': expected whitespace, comment or FROM (line 1, column 23) - I was missing the FROM keyword
After getting many "LoadExternalResourceException: Couldn't load the external resource at: file:../test/unclaimed.csv" and many variants of "file://c:/nosql/test/" etc i finally figured that the syntax for accessing a local file on windows is simply "file:c:/nosql/test/unclaimed.csv" and not file:// as might be inferred from examples on http://neo4j.com/docs/2.1.2/cypherdoc-importing-csv-files-with-cypher/ or anyone familiar with URI schema
Thanks folks
neo4j-sh (?)$ dbinfo -g Kernel KernelVersion
. – Stefan Armbrustercypher 2.1 load ...
– Michael Hunger