Skip to content

Instantly share code, notes, and snippets.

@victorfei
Last active December 7, 2022 01:33
Show Gist options
  • Save victorfei/3b9fabde7f11ca9d44f4df6b254cfe00 to your computer and use it in GitHub Desktop.
Save victorfei/3b9fabde7f11ca9d44f4df6b254cfe00 to your computer and use it in GitHub Desktop.
neo4j notes

Notes for setting up and running Neo4j

Community edition only supports 1 db.

Community edition only supports 1 db, to create and switch db, needs to got to neo4j config file and manually set new db info and restart. https://community.neo4j.com/t5/neo4j-graph-platform/create-multiple-databases-in-community-version/m-p/33900

load csv

In neo4j.conf which located at root installation dir.

# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to
# allow files to be loaded from anywhere in the filesystem; this introduces possible security problems. See the
# `LOAD CSV` section of the manual for details.
server.directories.import=import

return all relations doesn't involve null-addr

Match (n:Account)-[r]->(m:Account)
WHERE NOT n.address = '0x0000000000000000000000000000000000000000' AND NOT m.address = '0x0000000000000000000000000000000000000000'
Return n,r,m

Neo4j docs

https://neo4j.com/docs/cypher-manual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment