0
我想將數據導入到Neo4j的,並遵循以下鏈接指令數據導入的Neo4j ,結果是空...無法使用電子表格的方式
下面是數據的設置內容和屬性:
1.Instruction
cat import.txt | bin/neo4j-shell -config conf/neo4j.properties -path data/graph.db
2.import.txt
BEGIN
create (n:Female {id:1, name:'Amada Emory'});
create (n:Female {id:2, name:'Rana Seely'});
create (n:Female {id:3, name:'Detra Thatcher'});
create (n:Female {id:4, name:'Melda Reza'});
create (n:Female {id:5, name:'Shana Willems'});
create (n:Female {id:6, name:'Sharonda Peele'});
create (n:Female {id:7, name:'Dagny Agee'});
create (n:Female {id:8, name:'Tisa Woodman'});
create (n:Female {id:9, name:'Shelba Mutchler'});
create (n:Male {id:10, name:'Anderson Spagnola'});
create (n:Female {id:11, name:'Pamala Forward'});
create (n:Female {id:12, name:'Melva Fairchild'});
create (n:Male {id:13, name:'Antione Selman'});
create (n:Female {id:14, name:'Carmelia Cali'});
create (n:Female {id:15, name:'Fairy Daughtery'});
create (n:Female {id:16, name:'Stefany Mcamis'});
create (n:Male {id:17, name:'Kermit Meaney'});
create (n:Female {id:18, name:'Williemae Dossantos'});
create (n:Female {id:19, name:'Marth Sparling'});
create (n:Male {id:20, name:'Jarvis Noland'});
match (from {id:1}), (to {id:11}) create from-[:MOTHER_OF]->to;
match (from {id:1}), (to {id:12}) create from-[:MOTHER_OF]->to;
match (from {id:1}), (to {id:13}) create from-[:MOTHER_OF]->to;
match (from {id:2}), (to {id:14}) create from-[:MOTHER_OF]->to;
match (from {id:2}), (to {id:15}) create from-[:MOTHER_OF]->to;
match (from {id:2}), (to {id:16}) create from-[:MOTHER_OF]->to;
match (from {id:3}), (to {id:17}) create from-[:MOTHER_OF]->to;
match (from {id:3}), (to {id:18}) create from-[:MOTHER_OF]->to;
match (from {id:3}), (to {id:19}) create from-[:MOTHER_OF]->to;
match (from {id:10}), (to {id:20}) create from-[:FATHER_OF]->to;
match (from {id:14}), (to {id:1}) create from-[:MOTHER_OF]->to;
match (from {id:11}), (to {id:2}) create from-[:MOTHER_OF]->to;
match (from {id:11}), (to {id:3}) create from-[:MOTHER_OF]->to;
match (from {id:12}), (to {id:4}) create from-[:MOTHER_OF]->to;
match (from {id:12}), (to {id:5}) create from-[:MOTHER_OF]->to;
match (from {id:12}), (to {id:6}) create from-[:MOTHER_OF]->to;
match (from {id:17}), (to {id:7}) create from-[:FATHER_OF]->to;
match (from {id:13}), (to {id:8}) create from-[:MOTHER_OF]->to;
match (from {id:13}), (to {id:9}) create from-[:MOTHER_OF]->to;
match (from {id:20}), (to {id:1}) create from-[:FATHER_OF]->to;
COMMIT
3.neo4j-server.properties
...
# location of the database directory
org.neo4j.server.database.location=data/graph.db
...
neo4j.properties
# Default values for the low-level graph engine
#neostore.nodestore.db.mapped_memory=25M
#neostore.relationshipstore.db.mapped_memory=50M
#neostore.propertystore.db.mapped_memory=90M
#neostore.propertystore.db.strings.mapped_memory=130M
#neostore.propertystore.db.arrays.mapped_memory=130M
# Enable this to be able to upgrade a store from an older version
#allow_store_upgrade=true
# Enable this to specify a parser other than the default one.
#cypher_parser_version=2.0
# Keep logical logs, helps debugging but uses more disk space, enabled for
# legacy reasons To limit space needed to store historical logs use values such
# as: "7 days" or "100M size" instead of "true"
keep_logical_logs=true
# Autoindexing
# Enable auto-indexing for nodes, default is false
#node_auto_indexing=true
# The node property keys to be auto-indexed, if enabled
#node_keys_indexable=id,name,type
# Enable auto-indexing for relationships, default is false
#relationship_auto_indexing=true
# The relationship property keys to be auto-indexed, if enabled
#relationship_keys_indexable=name,age
# Enable shell server so that remote clients can connect via Neo4j shell.
#remote_shell_enabled=true
# Specify custom shell port (default is 1337).
#remote_shell_port=1234
但是,如果我加入創建和匹配塊之間COMMIT
和BEGIN
,該節點將添加成功,但是關係失敗... 的import.txt
格式爲:
BEGIN
...
create (n:Male {id:20, name:'Jarvis Noland'});
COMMIT
BEGIN
match (from {id:1}), (to {id:11}) create from-[:MOTHER_OF]->to;
...
COMMIT
有人能告訴我爲什麼嗎?非常感謝!