所以我尝试使用命令行跟随document一次导入节点和关系。
./neo4j-import --into /Users/Zhen/desktop/Courses/Bigdata/stackexchange/data \
--nodes post2.csv --relationships post_relation.csv --delimiter ";" --array-delimiter "|"
但是,我收到以下错误消息。任何人都可以给我一些如何解决它的提示吗?谢谢!
Input error: Expected '--nodes' to have at least 1 item, but had 0 ([])
Caused by:Expected '--nodes' to have at least 1 item, but had 0 ([])
java.lang.IllegalArgumentException: Expected '--nodes' to have at least 1 item, but had 0 ([])
at org.neo4j.kernel.impl.util.Validators$4.validate(Validators.java:114)
at org.neo4j.kernel.impl.util.Validators$4.validate(Validators.java:108)
at org.neo4j.helpers.Args.validated(Args.java:594)
at org.neo4j.helpers.Args.interpretOptionsWithMetadata(Args.java:562)
at org.neo4j.tooling.ImportTool$8.apply(ImportTool.java:721)
at org.neo4j.tooling.ImportTool$8.apply(ImportTool.java:717)
at org.neo4j.tooling.ImportTool.main(ImportTool.java:315)
at org.neo4j.tooling.ImportTool.main(ImportTool.java:279)
我的数据如下: $ head post2.csv
postID:ID;CreationDate;Tags;ViewCount;FavoriteCount;:LABEL
5;2014-05-13T23:58:30.457;[machine-learning];240;1;1
7;2014-05-14T00:11:06.457;[education];245;1;1
9;2014-05-14T00:36:31.077;;;;2
10;2014-05-14T00:53:43.273;;;;2
14;2014-05-14T01:25:59.677;[data-mining];619;2;1
15;2014-05-14T01:41:23.110;[databases];110;;1
16;2014-05-14T01:57:56.880;[machine-learning, libsvm];186;;1
$ head post_relation.csv
:START_ID;:END_ID;:TYPE
9;5;post_relation
10;7;post_relation
21;19;post_relation
23;7;post_relation
答案 0 :(得分:2)
您需要指定post2.csv
(以及post_relation.csv
)的正确路径。 (据推测,您的CSV文件不在neo4j bin
目录中。)