Reference Graphs in Notebook Paragraphs

You can reference property graphs by name in Java (PGX), Python(PGX) and the PGQL (PGX) paragraphs.

The following example loads a PGQL Property Graph named BANK_GRAPH into memory and the graph can be accessed in any subsequent notebook paragraphs:

var graph = session.readGraphByName("BANK_GRAPH", GraphSource.PG_VIEW)
graph = session.read_graph_by_name("BANK_GRAPH", "pg_view")
SELECT v,e FROM MATCH (v)-[e]->() ON BANK_GRAPH LIMIT 10

Optionally, you can navigate to the Graphs page and verify the In Memory column for the graph. This column must show the value in memory to indicate that the property graph is successfully loaded into memory.