Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-17-2021 10:33 PM
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.
10-18-2021 08:10 AM
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
All the sessions of the conference are now available online