Graph Catalog
Graph algorithms run on a graph data model which is a projection of the Neo4j property graph data model. A graph projection can be seen as a materialized view of the graph stored in a Neo4j database, containing only analytically relevant, potentially aggregated, topological and property information. Graph projections are stored entirely in-memory using compressed data structures optimized for topology and property lookup operations.
The graph catalog is a concept within the GDS library that allows managing multiple graph projections by name. Using its name, a graph projection can be used many times in the analytical workflow.
After usage, named graphs can be removed from the catalog to free up main memory. This chapter details all available graph catalog operations.
1. Considerations
1.1. Lifecycle
The graph catalog exists as long as the Neo4j instance is running. When Neo4j is restarted, graphs stored in the catalog are lost. See Backup and Restore to learn how to persist your graph projections. |
1.2. Security
Projecting, using, listing, and dropping named graphs are management operations bound to a specific database user. Graphs projected by a different database user are not accessible at any time, except for administrator users. Read more about that in Administration.
2. Graph projections
Named graphs can be projected from a Neo4j database by using either of
But graphs can also be projected into the graph catalog from other sources. Subgraph and Graph Sampling projections allow projecting a new graph based off of an existing graph projection. Randomised graphs can be generated, and graphs can be constructed from external data via an Apache Arrow connection.
Name | Description |
---|---|
Adds a graph to the catalog using Native projection. |
|
Adds a graph to the catalog using Cypher projection. |
|
Adds a graph to the catalog by filtering an existing graph using node and relationship predicates. |
|
Adds a graph to the catalog by sampling an existing graph using random walk with restarts. |
|
Adds a graph to the catalog by sampling an existing graph using Common Neighbour Aware Random Walk algorithm. |
|
Creates a new random graph projection of the user-defined properties and dimensions. |
|
Adds a graph to the catalog using Legacy Cypher projection. |
3. Inspecting the graph catalog
Name | Description |
---|---|
Prints information about graphs that are currently stored in the catalog. |
|
Checks if a named graph is stored in the catalog. |
4. Modifying the graph catalog
Name | Description |
---|---|
Computes and adds a new node label to the graph. |
|
Converts relationship of a given type in a graph from directed to undirected. |
5. Exporting from the graph catalog
Name | Description |
---|---|
Streams a single node property stored in a named graph. |
|
Streams node properties stored in a named graph. |
|
Streams relationship topologies stored in a named graph. |
|
Streams a single relationship property stored in a named graph. |
|
Streams relationship properties stored in a named graph. |
|
Writes node properties stored in a named graph to Neo4j. |
|
Writes relationships stored in a named graph to Neo4j. |
|
Exports a named graph into a new offline Neo4j database. |
|
Exports a named graph into CSV files. |
6. Removing from the graph catalog
Name | Description |
---|---|
Drops a named graph from the catalog. |
|
Removes node properties from a named graph. |
|
Deletes relationships of a given relationship type from a named graph. |
Was this page helpful?