【发布时间】:2019-07-21 05:37:08
【问题描述】:
我正在尝试加载包含两个节点(Autor、Paper)和与导入工具的关系的图表,现在我有这两个文件,据我了解,它们必须是:
作者.csv: :Author(Autor) :Adscription(Autor) :PMID(Paper) 作者 1 血液科。 31207293
论文.csv
:PMID(论文) :PaperName(论文) :AuthorList(Autor)
31207293 巨大的论文名 Author1,Author2,
这些文件存储在 /var/lib/neo4j/import 中
考虑到这一点,我运行以下代码
sudo neo4j-admin import --database=graph.db --id-type=STRING --mode=csv --delimiter=" " --nodes :Autor:Paper="authors.csv,Papers.csv"
但我得到了
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Expected '--nodes' to have at least 1 valid item, but had 0 []
usage: neo4j-admin import [--mode=csv] [--database=<name>]
[--additional-config=<config-file-path>]
[--report-file=<filename>]
[--nodes[:Label1:Label2]=<"file1,file2,...">]
[--relationships[:RELATIONSHIP_TYPE]=<"file1,file2,...">]
现在,我只是尝试加载节点 Paper 和 Author,我可以通过以下方式在浏览器中执行此操作
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///authors.csv" AS row
MERGE ( c:Autor{ Name:row.Autor , Adscription: row.Adscription, PMID=row.PMID } )
但是这样做所花费的时间很长。
【问题讨论】: