dadycoo
dadycoo

Reputation: 1

Error importing data from postgres to neo4J ETL tool

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:Asg) ASSERT n.asgId IS UNIQUE" ^

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

Answers (1)

Giuseppe Villani
Giuseppe Villani

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

Related Questions