I am new to cypher and I am trying to import data from CSV file with constraints in cypher, and I get the following error message
Neo.ClientError.Statement.SyntaxError: Invalid input 'L': expected whitespace, comment, ';' or end of input (line 3, column 1 (offset: 54)) "LOAD CSV WITH HEADERS FROM 'file:///routes.csv' AS line"
I tried it without the constraint statement and it works fine, the error appears when I use create constraint
CREATE CONSTRAINT ON (x:Route) ASSERT x.id IS UNIQUE
LOAD CSV WITH HEADERS FROM 'file:///routes.csv' AS line
CREATE (r:Route {id:line.route_id, name:line.route_short_name, fare: TOINT(line.route_fare), url:line.URL})
RETURN r