Reputation: 21
I have tried all variations on the following and have combed through and tried the many solutions offered to similar problems posted here. I try:
LOAD CSV WITH HEADERS
FROM "file:///C:/neo/coordinates.csv"
AS Line
CREATE (c:Church {id: toInteger(Line.id), name: Line.name, address: toInteger(Line.address), city: line.city, state: toInteger(Line.state) long: toInteger(Line.long), lat: toInteger(Line.lat), g: toInteger(Line.g)})
and get errors like this -
Neo.ClientError.Statement.SyntaxError: Invalid input 'l': expected whitespace, comment, '.', node labels, '[', "=~", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', '~', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',' or '}' (line 4, column 140 (offset: 209))
Help? I'm rather new to this. Oh, and I'm on windows 10. Thanks!
Upvotes: 1
Views: 3705
Reputation: 4052
Add a comma(,) before the property long.
In this part:
state: toInteger(Line.state) , long: toInteger(Line.long)
Also, change line to Line here
city: line.city
I am adding the query with corrections here:
LOAD CSV WITH HEADERS
FROM "file:///C:/neo/coordinates.csv"
AS Line
CREATE (c:Church {id: toInteger(Line.id), name: Line.name, address: toInteger(Line.address), city: Line.city, state: toInteger(Line.state), long: toInteger(Line.long), lat: toInteger(Line.lat), g: toInteger(Line.g)})
Upvotes: 1