APOC CSV loader

  • Error:

    Failed to invoke procedure `apoc.import.csv`:
      Caused by: java.lang.IllegalStateException: No match found 
    org.neo4j.graphdb.QueryExecutionException: Failed to invoke procedure `apoc.import.csv`:
      Caused by: java.lang.IllegalStateException: No match found
    
  • Solution: Double-check the header of the CSV file and the provided delimiter.

Graph Data Science library

  • Error:

    Caused by: java.lang.NullPointerException: Configured default provider: `native-btree-1.0` not found. Available index providers: [].
    
  • Solution: The problem is mixed versions such as using GDS 1.2 with Neo4j 3.5 (instead of 4.0).

Import tool erros with “directory does not exist”

  • Error: The neo4j-admin import tool fails with:

    Directory of /some/path/to/file.csv doesn't exist
    
  • Solution: A likely cause of this problem is using Neo4j 3.x importer with the arguments intended for Neo4j 4.x.

Start Neo4j in Docker

Use a similar command:

docker run --rm \
    --user="$(id -u):$(id -g)" \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --detach \
    ${NEO4J_ENV_VARS} \
    --volume=${NEO4J_DATA_DIR}:/data \
    --volume=${NEO4J_CONTAINER_ROOT}/logs:/logs \
    --volume=${NEO4J_CONTAINER_ROOT}/import:/var/lib/neo4j/import \
    --volume=${NEO4J_CONTAINER_ROOT}/plugins:/plugins \
    --env NEO4JLABS_PLUGINS='["apoc", "graph-data-science"]' \
    --env NEO4J_AUTH=none \
    --name ${NEO4J_CONTAINER_NAME} \
    neo4j:${NEO4J_VERSION}

To run the Enterprise edition, consult the license agreement and pass:

NEO4J_VERSION=4.4.2-enterprise
NEO4J_ENV_VARS="--env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes"

The Enterprise edition supports the parallel runtime. To use this, preprend the query with CYPHER runtime=parallel:

CYPHER runtime=parallel MATCH (p:Person) RETURN count(p)

Copy-paste snippet (v4.4.2 Community Edition) with ephemeral (non-mounted) directories:

docker run --rm \
    --user="$(id -u):$(id -g)" \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --detach \
    --env NEO4JLABS_PLUGINS='["apoc", "graph-data-science"]' \
    --env NEO4J_AUTH=none \
    neo4j:4.4.2
n.js">