Virtual graph models

This is the public preview documentation of Neo4j Virtual Graph. To provide feedback, please use the feedback form you were granted access to.

During the public preview, we advise you not to use sensitive or production data with Virtual Graph.

A virtual graph model defines the translation from SQL tables and columns into graph nodes and relationships. Neo4j Virtual Graph uses the model to project an SQL data source to nodes and relationships that can be queried using Cypher®. Virtual Graph interprets Cypher queries against the model and executes SQL queries to retrieve the underlying data.

Virtual Graph models can be found on the Graph models tab in the Aura Import page.

Creating a graph model

There are three ways of creating a graph model:

  • Create a data source when you create your Virtual Graph instance via Create a new graph model.

  • Select Create graph model from the Graph models tab of the Aura Import page.

  • Select New graph model from data source from the […​] more menu of a data source listed in the Data sources tab of the Import.

If no data source is selected, select one.

There are three starting points for a model:

  • Define manually without suggestions.

  • Generate from schema, which tries to map the SQL table data to suitable node data.

  • Generate with AI, which leverages LLM analysis to generate a model.

In any case, it is worthwhile to make sure that the graph model correctly matches the SQL table data.

For details on how to use the model editor, refer to the Aura data import documentation.

Managing a graph model

Each graph model tile on the Graph models tab in the Aura Import page has a […​] more menu that allows you to:

  • Copy the model ID

  • Rename the graph model

  • Duplicate the model

  • Delete the model

Entity type uniqueness

When you create your graph model, make sure that the following hold:

  • Relationship types must be unique, i.e. the use of ACTED_IN in both (:Person)-[:ACTED_IN]→(:Movie) and (:Person)-[:ACTED_IN]→(:TvShow) is disallowed.

  • node labels must be unique, so you cannot create the node label (:Movie) twice. You can, however, use the same table as a backing table for different node labels.

If you choose to Generate from schema, both rules are applied. This however cannot be guaranteed in all cases if you generate a model with AI.