neo4j-spark-skill

Read and write Neo4j data with Apache Spark DataFrames.

101|35|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-spark-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neo4j-spark-skill
Source: https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-spark-skill
Command: npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-spark-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the friction of connecting Apache Spark or Databricks to Neo4j by providing a reliable way to ingest data into DataFrames and persist updates back into the graph.

Core Features & Use Cases

  • SparkSession + Connector Setup: Configure the Neo4j Connector for Apache Spark (including Databricks library install patterns) with the correct Maven artifact for your Spark/Scala runtime.
  • DataFrame Reads: Load nodes by label, run Cypher for read projections, or scan relationships with source/target label constraints.
  • DataFrame Writes: Write nodes and relationships using SaveMode, including MERGE overwrite semantics via node.keys, plus partition/batch tuning to reduce lock contention.
  • Databricks Credentials Best Practices: Use Databricks secrets and cluster settings (including Unity Catalog shared-mode notes) to avoid hardcoding credentials.
  • Delta Lake → Neo4j Pipelines: Ingest from Delta tables into Neo4j using an end-to-end Spark write pattern, including a recommended two-phase node-then-relationship workflow.

Quick Start

Use the neo4j-spark-skill to connect your Spark or Databricks job to Neo4j, read nodes into a DataFrame by label, and write them back to Neo4j with MERGE using node.keys for stable overwrites.

Frequently Asked Questions about neo4j-spark-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and write Neo4j data with Apache Spark DataFrames?

To read and write Neo4j data with Apache Spark DataFrames, use the Neo4j Connector for Apache Spark to load nodes via label scans, execute custom Cypher queries, and persist relationships back to the graph using SaveMode.

Can I ingest Delta Lake tables into Neo4j using Databricks?

Yes, you can ingest Delta Lake tables into Neo4j using Databricks by reading Delta tables into Spark DataFrames and writing them to Neo4j using a recommended two-phase node-then-relationship workflow.

What's the best way to overwrite Neo4j nodes with Spark without duplicating data?

The best way to overwrite Neo4j nodes with Spark without duplicating data is to use SaveMode Overwrite with node.keys, which applies MERGE semantics to update existing graph entities instead of appending duplicates.

Does the Neo4j Connector for Apache Spark support Databricks Unity Catalog shared-mode?

Yes, the Neo4j Connector for Apache Spark supports Databricks Unity Catalog shared-mode, and you should use Databricks secrets for cluster configuration to avoid hardcoding credentials when setting up the connection.

Why does writing Spark DataFrames to Neo4j cause lock contention?

Writing Spark DataFrames to Neo4j causes lock contention when partition and batch sizes are not properly tuned, so you must adjust these performance parameters to reduce concurrent write conflicts during graph persistence.

Do I need a specific Maven artifact to connect Spark to Neo4j?

Yes, you need to select the correct Maven artifact for the Neo4j Connector for Apache Spark that matches your specific Spark, Scala, and Databricks runtime version to ensure proper DataFrame ingestion and graph connectivity.