NEO4J导入数据备忘
学习链接:https://neo4j.com/docs/operations-manual/current/tutorial/neo4j-admin-import/
bin\neo4j-admin import --database=neo4j --skip-bad-relationships --skip-duplicate-nodes --nodes=import\nuget_all_releases.csv --relationships=import\nuget_project_dependencies.csv,import\nuget_project_dependencies2.csv
带有头节点:
bin/neo4j-admin import --database=neo4j --nodes=import/movies4-header.csv,import/movies4-part1.csv,import/movies4-part2.csv --nodes=import/actors4-header.csv,import/actors4-part1.csv,import/actors4-part2.csv --relationships=import/roles4-header.csv,import/roles4-part1.csv,import/roles4-part2.csv
备份:
bin\neo4j-admin import --skip-bad-relationships --skip-duplicate-nodes --database=neo4j --nodes=D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_all_releases.csv --relationships=D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies_header.csv,D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies200.csv,D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies300.csv,D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies450.csv,D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies500.csv,D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies600.csv,D:\Neo4j\WorkPlace\CSV\NuFix\backups\nuget_project_dependencies700.csv
建立索引:
create text index node_package_version for (n:Package) on (n.version)
create text index node_package_package_name for (n:Package) on (n.package_name)
neo4j-admin import --skip-bad-relationships --skip-duplicate-nodes --database=neo4j --nodes=/var/lib/neo4j/import/nuget_all_releases.csv
--relationships=/var/lib/neo4j/import/nuget_project_dependencies_header.csv,/var/lib/neo4j/import/nuget_project_dependencies796.csv,/var/lib/neo4j/import/nuget_project_dependencies700.csv,
/var/lib/neo4j/import/nuget_project_dependencies600.csv,/var/lib/neo4j/import/nuget_project_dependencies500.csv,/var/lib/neo4j/import/nuget_project_dependencies450.csv,
/var/lib/neo4j/import/nuget_project_dependencies300.csv,/var/lib/neo4j/import/nuget_project_dependencies200.csv,/var/lib/neo4j/import/nuget_project_dependencies106.csv,
/var/lib/neo4j/import/nuget_project_dependencies100.csv
LOAD CSV: