Reputation: 1
Please i want to import data to neo4j from postgres using ETL neo4j tool but i get this error
Best Regards;
Unable to execute Query: Invalid constraint syntax, ON and ASSERT should not be used. Replace ON with FOR and ASSERT with REQUIRE. (line 1, column 1 (offset: 0)) "CREATE CONSTRAINT ON (n:Asbr) ASSERT n.asbrId IS UNIQUE" ^
need to know the solution
Upvotes: 0
Views: 789
Reputation: 131
Presumably it happens because the neo4j-etl constraint handler leverage a no longer valid syntax, i.e. "CREATE CONSTRAINT ON .. ASSERT ..."
Actually, the syntax for neo4j 5.x should be changed to "CREATE CONSTRAINT FOR ... REQUIRE..."
.
I created a GitHub issue for this one, which we'll resolve asap: https://github.com/neo4j-contrib/neo4j-etl/issues/93
Upvotes: 0