Neo4j
我想在using中插入一些数据py2neo
。链接到数据文件。我是新手Neo4j
。有人可以告诉我如何将批量数据插入到Neo4j
.Actually我想做......的性能Neo4j
测试
我已经尝试过了,但这仅适用于小数据集...
from pprint import pprint
from py2neo import neo4j,node, rel
graph_db = neo4j.GraphDatabaseService()
def insert_data():
die_hard = graph_db.create(
node(name="Bruce Willis"),
node(name="John McClane"),
node(name="Alan Rickman"),
node(name="Hans Gruber"),
node(name="Nakatomi Plaza"),
rel(0, "PLAYS", 1),
rel(2, "PLAYS", 3),
rel(1, "VISITS", 4),
rel(3, "STEALS_FROM", 4),
rel(1, "KILLS", 3),)
pprint(die_hard)
insert_data()
错误 :
src/test/java/org/neo4j/batchimport/TestDataGenerator.java:3: error: package org.junit does not exist
import org.junit.Ignore;
^
src/test/java/org/neo4j/batchimport/TestDataGenerator.java:14: error: cannot find symbol
@Ignore
^
symbol: class Ignore
2 errors