Marco Da Cunha
Marco Da Cunha

Reputation: 11

Export and Import Json Neo4j

Neo4j give you the possibility to export your graph in json but i don't find how to import this json for a new graph.

First, is it possible? Other way to do it?

Thank you,

Upvotes: 1

Views: 7066

Answers (1)

William Lyon
William Lyon

Reputation: 8556

You can use the apoc.load.json procedure to load JSON data into Neo4j using Cypher.

For example, given the json file person.json:

{
   "name": "Bob",
   "age": 27
}

You can load this using Cypher:

CALL apoc.load.json("file:///person.json") YIELD value AS person
CREATE (p:Person {name: person.name})
SET p.age = person.age

Upvotes: 7

Related Questions