简介
Neo4j的导入导出。
Mysql导出CSV
1.命令行方式。
不过下面要开启secure_file_priv='';才行
具体参考
select * from test.table1
into outfile '/table1.csv' fields terminated by ','
optionally enclosed by '"'
lines terminated by '\r\n';
2.Navicat导出。
Neo4j导入数据
1.只是查询。
#在导入的地方创建文件夹
mkdir /root/neo4j/neo4j-community-5.5.0/import/root/
load csv from 'file:///root/table1.csv' as line
return line;
2.导入到数据库。
load csv from 'http://we-yun.com/neo4jguide/movie.csv' as line
create (:Movie {title: line[0], released:line[1] , tagline: line[2]});
#也可以先下载下来导入
链接:https://pan.baidu.com/s/1vLKXV_8r2YA_VThbV-eFQw
提取码:yyds
--来自百度网盘超级会员V5的分享
load csv from 'file:///root/movie.csv' as line
create (:Movie {title: line[0], released:line[1] , tagline: line[2]});
match (n) return n;
在导入大量文件的时候可以使用