Hi everyone,
I have tried to import database from Mysql to Neo4j, but there are some error report by logs.
Some keys has properties in MySql as unique, and these properties seems cant be import with syntax error. But I havent find the right place to replace the syntax.
(I have tried Neo4j database 5.9.0 and 4.4.22 mysql 8.0)
here is my full error:
- Direct driver instance 1668837760 created for server address localhost:7687
- Running ETL on Neo4j 5.9.0 - ENTERPRISE
- Direct driver instance 33419717 created for server address localhost:7687
- Starting reading metadataMapping
- Creating constraints on nodes
- Creating constraint for label Hangar and properties (h-number
)
- Creating constraint for label Airplane and properties (reg-no
)
- Creating constraint for label Plane-Type and properties (model)
- Creating constraint for label Pilot and properties (n-i-n
)
- Creating constraint for label Perform-By and properties (rowIndex)
- Creating constraint for label Person and properties (n-i-n
)
- Creating constraint for label Service and properties (s-date
,reg-no
)
- Creating nodes with label Hangar
- Creating nodes with label Airplane
- Creating nodes with label Plane-Type
- Creating nodes with label Pilot
- Creating nodes with label Perform-By
- Creating nodes with label Person
- Creating nodes with label Service
- Creating relationships of type SERVICE
- Creating relationships of type PERSON
- Creating relationships of type AIRPLANE
- Creating relationships of type PLANE_-_TYPE
- Creating relationships of type AIRPLANE
- Creating relationships of type HANGAR
- Creating relationships of type PERSON
- Creating relationships of type OWNED_-BY-DURING-_PERIOD
- Creating relationships of type FLIGHT
- Creating relationships of type CAN_-BE-WORKED-ON-_BY
- Creating relationships of type CAN_-BE-PILOTED-_BY
- Data imported with errors. Below the list of errors.
- For exception ClientException we got the following errors:
-
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:Hangar) ASSERT n.h-number
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:Airplane) ASSERT n.reg-no
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:Plane-Type
) ASSERT n.model 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:Pilot) ASSERT n.n-i-n
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:Perform-By
) ASSERT n.rowIndex 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:Person) ASSERT n.n-i-n
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:Service) ASSERT (n.s-date
,n.reg-no
) IS NODE KEY"