Neo4j Connector for Apache Spark

The Neo4j Connector for Apache Spark provides integration between Neo4j and Apache Spark.

You can use the connector to process and transfer data between Neo4j and other platforms such as Databricks and several data warehouses. Based on the Spark DataSource API, the connector supports all the programming languages that Spark supports.

Graphs and DataFrames

The connector uses schema inference to convert Neo4j graphs into Spark table-based DataFrames. For example, consider a graph with the following schema:

Example graph

The connector creates a DataFrame with :Customer and :Product nodes connected by the BOUGHT relationship, along with any node or relationship properties. The Schema inference section shows a more detailed example of this process, while the Data type mapping section shows how data types are mapped between Neo4j and Spark.

The connector supports writing DataFrames to Neo4j as well, and custom Cypher® queries both for reading and for writing data.

Compatibility

The following table summarizes the compatibility of each version of the connector with Neo4j, Apache Spark, and Databricks. For more details on compatibility, see Compatibility.

Table 1. Connector version compatibility table
Connector Neo4j Spark Databricks

5.4

4.4, 5.x, 2025.x, 2026.x

3.4, 3.5

14.3 LTS - 16.4 LTS

5.3

4.4, 5.x, 2025.x

3.4, 3.5

14.3 LTS - 16.4 LTS

5.2

4.4, 5.x

3.4, 3.5

14.3 LTS - 16.4 LTS

Neo4j versions include both Community editions and Enterprise editions.

All 5.x versions of the connector support Scala 2.12 and 2.13.

The minimum required version of the Java runtime is 8.

Training

An introduction to the connector by Andrea Santurbano is available on YouTube.

License

The source code is provided under the terms of the Apache 2.0 license. You are free to download, modify, and redistribute the connector; however, Neo4j support applies only to official builds provided by Neo4j.

Support

For Neo4j Enterprise and Neo4j AuraDB customers, official releases of this connector are supported under the terms of your existing Neo4j support agreement. This support extends only to regular releases and excludes alpha, beta, and pre-releases. If you have any questions about the support policy, get in touch with Neo4j.

© 2026