lemonhu / stock-knowledge-graph

利用网络上公开的数据构建一个小型的证券知识图谱/知识库
MIT License
1.99k stars 597 forks source link

关于命令行的问题 #9

Open Chengdong-Yang opened 4 years ago

Chengdong-Yang commented 4 years ago

我是一名新手,请问命令行究竟要怎么写,就一直报错。。。。。。一直报useage,我也把csv文件放在bin下面了,为什么会识别不出来,谢谢 :\neo4j-community-3.4.17\bin>neo4j-admin import --nodes executive.csv --nodes stock.csv -- nodes concept.csv --nodes industry.csv --relationships executive_stock.csv --relationships stock_industry.csv -- relationships stock_concept.csv unrecognized option: ''

usage: neo4j-admin import [--mode=csv] [--database=] [--additional-config=] [--report-file=] [--nodes[:Label1:Label2]=<"file1,file2,...">] [--relationships[:RELATIONSHIP_TYPE]=<"file1,file2,...">] [--id-type=<STRING|INTEGER|ACTUAL>] [--input-encoding=] [--ignore-extra-columns[=<true|false>]] [--ignore-duplicate-nodes[=<true|false>]] [--ignore-missing-nodes[=<true|false>]] [--multiline-fields[=<true|false>]] [--delimiter=] [--array-delimiter=] [--quote=] [--max-memory=] [--f=<File containing all arguments to this impo

lemonhu commented 4 years ago

谢谢关注,问题可能在于neo4j-community-x.x.x/conf/neo4j.conf中的参数配置,在dbms.directories.import=import前加上#,以允许从任意路径进行数据导入。

perfect-11 commented 4 years ago

请问你的这个问题解决了吗?我的情况跟你的一样,不知道怎么解决

Chengdong-Yang commented 4 years ago

D:\neo4j-community-3.4.17\bin\neo4j-admin import  neo4j-admin import --database=stock.db --ignore-duplicate-nodes=true --ignore-missing-nodes=true --id-type=string --nodes D:\neo4j-community-3.5.14\bin\import\executive.csv --nodes D:\neo4j-community-3.5.14\bin\import\stock.csv --nodes D:\neo4j-community-3.5.14\bin\import\concept.csv --nodes D:\neo4j-community-3.5.14\bin\import\industry.csv --relationships D:\neo4j-community-3.5.14\bin\import\executive_stock.csv --relationships D:\neo4j-community-3.5.14\bin\import\stock_industry.csv --relationships D:\neo4j-community-3.5.14\bin\import\stock_concept.csv

我好像是用上边这个命令,后来将作者的文件下载下来,存在d盘,把文件放入import文件,后来好像就和作者一样运行了。就像附件的图一样 加油

------------------ 原始邮件 ------------------ 发件人: "perfect-11"<notifications@github.com>; 发送时间: 2020年3月7日(星期六) 下午5:05 收件人: "lemonhu/stock-knowledge-graph"<stock-knowledge-graph@noreply.github.com>; 抄送: "晚街听风"<1076964753@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [lemonhu/stock-knowledge-graph] 关于命令行的问题 (#9)

请问你的这个问题解决了吗?我的情况跟你的一样,不知道怎么解决

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

perfect-11 commented 4 years ago

多谢大佬,解决了。 cd进入到bin目录下,执行下面的命令。 neo4j-admin import --database=stock.db --ignore-duplicate-nodes=true --ignore-missing-nodes=true --id-type=string --nodes=D:\neo4j\neo4j-community-3.5.15\import\executive.csv --nodes=D:\neo4j\neo4j-community-3.5.15\import\stock.csv --nodes=D:\neo4j\neo4j-community-3.5.15\import\industry.csv --nodes=D:\neo4j\neo4j-community-3.5.15\import\concept.csv --relationships=D:\neo4j\neo4j-community-3.5.15\import\executive_stock.csv --relationships=D:\neo4j\neo4j-community-3.5.15\import\stock_industry.csv --relationships=D:\neo4j\neo4j-community-3.5.15\import\stock_concept.csv