cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to visualize graph without saving nodes in db

Hey, I have neo4j db.
I am looking for way to open graph from file(json, xml or something like that) but without saving the nodes and overwriting what I have now in the db, just visualize it.

Any suggestions?
Thanks in advance.

1 REPLY 1

The answer depends on the file content.
However, in general you could use the APOC procedures to visualize virtual graph from a file.

For example, if we have a file "person.csv", that is supposed to be imported with label "Person", like this:

name,surname
John,Doe
Jane,Foobar

we can execute a concatenation of apoc.load.csv and virtual nodes.
That is:

CALL apoc.load.csv("person.csv") YIELD map 
WITH map // we retrieve the csv as a row of maps, so {"name":"John", "surname": "Doe"} , {"name": "Jane", "surname": "Foobar"}
CALL apoc.create.vNode(['Person'], map) // we create 2 virtual nodes from csv
YIELD node
RETURN node