You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the graph nodes and relations (no constraints included)
In the browser, generate the json file using CALL apoc.export.json.all("jsonfile.json")
Stop the container
Remove the data in the volume (note: sudo might be required due to folder ownership)
Start the container again
Check (exec into the running container using command docker exec -it <container id> /bin/bash and then check the import folder) that the json file exported earlier is available in the import folder
Try to import the json using CALL apoc.import.json("jsonfile.json")
Currently used versions
Versions
OS: Ubuntu 20.04
Neo4j: 5.23.0
Neo4j-Apoc: 5.23.0
The text was updated successfully, but these errors were encountered:
This isn't a bug, Unique constraints are required to be able to do importing as the error is saying. The linked bug was that this error would happen, and any constraint that was made (e.g an existence constraint) would be accepted, which was incorrect as the constraint must be a uniqueness one.
Unfortunately, the procedure has WRITE mode and not SCHEMA mode, so it is not possible for this behaviour to change. I do see that this is not properly documented, and will amend that :)
Just to be clear, a unique constraint is needed for every imported node/relationship label/type on the importing id. The error message will let you know when a constraint has been missed.
Expected Behavior (Mandatory)
The json files exported using apoc.export.json.all should get imported using apoc.import.json
Actual Behavior (Mandatory)
The error related to constraint check is getting generated even though it should have been fixed as per the fix for the issue 2930
How to Reproduce the Problem
Environment:: docker
Image: neo4j- 5.23.0-community-bullseye image
Docker compose file:
Steps
CALL apoc.export.json.all("jsonfile.json")
docker exec -it <container id> /bin/bash
and then check the import folder) that the json file exported earlier is available in the import folderCALL apoc.import.json("jsonfile.json")
Currently used versions
Versions
The text was updated successfully, but these errors were encountered: