cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

How to get the steps used to build the Neo4j Graph?

steves
Node Clone

For example I am using the following Cypher code to build my initial graph:

CREATE (forrestGump:Movie {title: 'Forrest Gump', released: 1994}) 
CREATE (robert:Person:Director {name: 'Robert Zemeckis', born: 1951}) 
CREATE (tom:Person:Actor {name: 'Tom Hanks', born: 1956}) 
CREATE (tom)—[:ACTED_IN {roles: ['Forrest']}]—>(forrestGump)

Over time more and more Cypher code added, more CREATE and MERGE commands.

How can I get all the steps that used to build my graph? I have tried CALL db.schema.visualization() but it won't provide me with the steps above.

Please guide me how can I get the building steps?

1 ACCEPTED SOLUTION

steves
Node Clone

For others that will have a similar issue, here are the docs that solved the issue:

https://neo4j.com/labs/apoc/4.4/export/cypher/

Just choose which export procedure is suitable for your needs. It will export all the queries that used to build the graph.

View solution in original post

2 REPLIES 2

glilienfield
Ninja
Ninja

You can’t. You will need to maintain your scripts if you want to rerun them. 

there is something called LiquidBase that may help you version and execute your scripts.  There is some form of Neo4j available separately. 

https://www.liquibase.com/pricing

there are also apoc export/import procedures to dump your data and reload it. 

steves
Node Clone

For others that will have a similar issue, here are the docs that solved the issue:

https://neo4j.com/labs/apoc/4.4/export/cypher/

Just choose which export procedure is suitable for your needs. It will export all the queries that used to build the graph.