NEO4J CSV neo4j-admin大型数据导入

来源:(47条消息) neo4j-admin 海量数据入库教程研究_ailx10的博客-CSDN博客

(47条消息) Neo4j之Admin管理员操作_森林森的博客-CSDN博客

首先:要关闭NEO4J

然后再进行教程里的操作

:::

有head的csv文件
movies.csv 注意:

:LABEL 节点才有标签,多标签使用“;”分号连接
节点必须有ID,因为边的csv需要节点ID
movieId:ID,title,year:int,:LABEL
tt0133093,"The Matrix",1999,Movie
tt0234215,"The Matrix Reloaded",2003,Movie;Sequel
tt0242653,"The Matrix Revolutions",2003,Movie;Sequel
actors.csv

personId:ID,name,:LABEL
keanu,"Keanu Reeves",Actor
laurence,"Laurence Fishburne",Actor
carrieanne,"Carrie-Anne Moss",Actor
roles.csv 注意:

:TYPE 边才有类型
:START_ID和:END_ID是节点中的ID,因为边是由2个节点构成
:START_ID,role,:END_ID,:TYPE
keanu,"Neo",tt0133093,ACTED_IN
keanu,"Neo",tt0234215,ACTED_IN
keanu,"Neo",tt0242653,ACTED_IN
laurence,"Morpheus",tt0133093,ACTED_IN
laurence,"Morpheus",tt0234215,ACTED_IN
laurence,"Morpheus",tt0242653,ACTED_IN
carrieanne,"Trinity",tt0133093,ACTED_IN
carrieanne,"Trinity",tt0234215,ACTED_IN
carrieanne,"Trinity",tt0242653,ACTED_IN
第一步:导入csv文件

bin/neo4j-admin import --nodes=import/movies.csv --nodes=import/actors.csv --relationships=import/roles.csv

 

posted @ 2022-06-05 10:09  博二爷  阅读(168)  评论(0编辑  收藏  举报