我想使用py2neo
將一些數據插入Neo4j
。 Link到數據文件。 我是Neo4j
的新手。誰能告訴我如何批量數據插入到Neo4j
。其實我想要做的Neo4j
性能測試.....如何使用Python將批量數據插入到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
[在Python中使用Neo4j執行批量添加/插入操作的最快方法](http://stackoverflow.com/questions/12643662/fastest-way-to-perform-bulk-add-insert-in- neo4j與蟒蛇) – zero323
我已經嘗試[批量導入](https://github.com/jexp/batch-import),但它不工作...任何人都可以幫我 –
有沒有任何標準的基準測試' Neo4j' –