【发布时间】:2017-12-03 09:13:37
【问题描述】:
我想将以下 CSV 文件导入 neo4j
:START_ID,:END_ID,:TYPE
1, 2, call
2, 3, text
3, 2, text
6, 3, text
5, 6, text
5, 4, call
4, 1, call
4, 5, text
1, 5, call
1, 8, call
6, 8, call
6, 8, text
8, 6, text
7, 1, text
和
person:ID,name,value:int
1,Alice,1
2,Bob,0
3,Charlie,0
4,David,0
5,Esther,0
6,Fanny,0
7,Gabby,0
8,XXX,1
通过导入
DATA_DIR_SAMPLE=/data_network/
$NEO4J_HOME/bin/neo4j-admin import --into ${NEO4J_HOME}/data/databases/social.db \
--nodes:Person ${DATA_DIR_SAMPLE}/v.csv \
--relationships ${DATA_DIR_SAMPLE}/e.csv \
--ignore-empty-strings true \
--skip-duplicate-nodes true \
--skip-bad-relationships true \
--bad-tolerance 1500 \
--multiline-fields=true
告诉我,所有关系都包含缺失的节点。这里有什么问题?
InputRelationship:
source: /data_network/e.csv:2
startNode: 1 (global id space)
endNode: 2 (global id space)
type: call
referring to missing node 2
InputRelationship:
source: /data_network/e.csv:3
startNode: 2 (global id space)
endNode: 3 (global id space)
type: text
referring to missing node 3
InputRelationship:
source: /data_network/e.csv:4
startNode: 3 (global id space)
endNode: 2 (global id space)
type: text
referring to missing node 2
InputRelationship:
source: /data_network/e.csv:5
startNode: 6 (global id space)
endNode: 3 (global id space)
type: text
referring to missing node 3
InputRelationship:
source: /data_network/e.csv:6
startNode: 5 (global id space)
endNode: 6 (global id space)
type: text
referring to missing node 6
InputRelationship:
source: /data_network/e.csv:7
startNode: 5 (global id space)
endNode: 4 (global id space)
type: call
referring to missing node 4
InputRelationship:
source: /data_network/e.csv:8
startNode: 4 (global id space)
endNode: 1 (global id space)
type: call
referring to missing node 1
InputRelationship:
source: /data_network/e.csv:9
startNode: 4 (global id space)
endNode: 5 (global id space)
type: text
referring to missing node 5
InputRelationship:
source: /data_network/e.csv:10
startNode: 1 (global id space)
endNode: 5 (global id space)
type: call
referring to missing node 5
InputRelationship:
source: /data_network/e.csv:11
startNode: 1 (global id space)
endNode: 8 (global id space)
type: call
referring to missing node 8
InputRelationship:
source: /data_network/e.csv:12
startNode: 6 (global id space)
endNode: 8 (global id space)
type: call
referring to missing node 8
InputRelationship:
source: /data_network/e.csv:13
startNode: 6 (global id space)
endNode: 8 (global id space)
type: text
referring to missing node 8
InputRelationship:
source: /data_network/e.csv:14
startNode: 8 (global id space)
endNode: 6 (global id space)
type: text
referring to missing node 6
InputRelationship:
source: /data_network/e.csv:15
startNode: 7 (global id space)
endNode: 1 (global id space)
type: text
referring to missing node 1
【问题讨论】: