Generic

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.

Use this for any JDBC driver not covered by this page, for example PostgreSQL, Oracle Database, MySQL or MariaDB.

The generic datasource type is a best-effort escape hatch. It does not come with any dedicated support: the SQL dialect, type handling, and driver configuration details are entirely the responsibility of the user. Virtual Graph does not commit to compatibility for any particular driver covered by this type. The dialect reported to the engine is always Default.

How the driver is loaded

Drop the driver .jar file to NEO4J_HOME/lib exactly like the curated drivers below. Virtual Graph does not load JDBC drivers by class name. The driver is resolved from the JDBC URL’s subprotocol by java.sql.DriverManager through the standard service loader, so it must be a driver that registers itself with DriverManager.

Configuration

The datasource definition requires a JDBC URL of the form jdbc:<subprotocol>:…​ and an optional additionalProperties object. Every entry in additionalProperties except for some reserved keys like hikari.minimumIdle, hikari.maximumPoolSize and jdbc.fetch_size is forwarded verbatim to the underlying driver via HikariConfig#setDataSourceProperties.

Example for Oracle Database:

{
  "type": "generic",
  "url": "jdbc:oracle:thin:@//salesserver1:1521/sales.us.example.com",
  "additionalProperties": {
    "defaultRowPrefetch": "42",
    "encryption_client": "accepted"
  }
}

Example for PostgreSQL:

{
  "type": "generic",
  "url": "jdbc:postgresql://db.example.com:5432/sales",
  "additionalProperties": {
    "ApplicationName": "graph-engine"
  }
}

The URLs can contain all query parameters that the underlying driver might need or supports.

Oracle Drivers are available on the Oracle website, PostgreSQL JDBC Drivers are available on the PostGreSQL JDBC Driver website.

If any generic driver requires more than one single .jar file, place them all into the lib folder of Neo4j. This is the case for Oracle. Get the "Zipped JDBC driver (ojdbc17.jar) and Companion Jars". Note that it is wrongly labeled on the download page as "11".

Authentication

Only anonymous and basic secrets are supported. These are the only authentication modes standardized by the JDBC API. Any other secret type is rejected at data source creation time.