gpt4 book ai didi

csv - 将 csv 导入到 Neo4j 缺失节点

转载 作者:行者123 更新时间:2023-12-05 05:18:34 32 4
gpt4 key购买 nike

我想将以下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

最佳答案

添加一个额外的 :标签专栏正在解决这个问题。

关于csv - 将 csv 导入到 Neo4j 缺失节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47616940/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com