0
votes

this example in the neo4j docs shows multiple groups of nodes files, but only one group of relationships files.

neo4j_home$ ./bin/neo4j-import --into path_to_target_directory --nodes "movies4-header.csv,movies4-part1.csv,movies4-part2.csv" --nodes "actors4-header.csv,actors4-part1.csv,actors4-part2.csv" --relationships "roles4-header.csv,roles4-part1.csv,roles4-part2.csv"

what is the syntax to import multiple relationships files into neo4j with neo4j-import?

I can imagine extending the example to also have a DIRECTED_IN relationship type, which would be described in a file called directed-in4.csv

then, I could imagine that the call to neo4j-import would look like this:

neo4j_home$ ./bin/neo4j-import --into path_to_target_directory --nodes "movies4-header.csv,movies4-part1.csv,movies4-part2.csv" --nodes "actors4-header.csv,actors4-part1.csv,actors4-part2.csv" --relationships "roles4-header.csv,roles4-part1.csv,roles4-part2.csv" --relationships directed-in4.csv

with the additional --relationships directed-in4.csv tacked on at the end. Is this the correct approach?

1

1 Answers

0
votes

it appears that specifying multiple relationships does work like this:

neo4j_home$ ./bin/neo4j-import --into path_to_target_directory --nodes "movies4-header.csv,movies4-part1.csv,movies4-part2.csv" --nodes "actors4-header.csv,actors4-part1.csv,actors4-part2.csv" --relationships "roles4-header.csv,roles4-part1.csv,roles4-part2.csv" --relationships directed-in4.csv

with the additional --relationships argument