-
Notifications
You must be signed in to change notification settings - Fork 1
Neo4j
Jan Ehmueller edited this page Jul 27, 2017
·
1 revision
- install the package neo4j:
sudo apt-get install neo4j
- change the default database in
/etc/neo4j/neo4j.conf
(the fielddbms.active_database=<your database>.db
)
- stop the neo4j:
sudo service stop neo4j
- delete the old database if necessary with
sudo rm -r /var/lib/neo4j/data/databases/<your database>.db/
- make sure to create header files for your nodes and edges (example for the subject datastructure):
- nodeheader:
:ID(Subject),name,aliases:string[],category:LABEL,color
- edgeheader:
:START_ID(Subject),:END_ID(Subject),:TYPE
- nodeheader:
- import the new csv data:
sudo -u neo4j neo4j-admin import --mode=csv --database <your database>.db --nodes "nodeheader,<node file>" --relationships "edgeheader,<edge file>"
- you can concatenate multiple csv files for the node and edge import
- start the neo4j:
sudo service start neo4j