我想将出版物从csv导入到neo4j。并进行查询,该查询将选择所有出版物作者或至少一个作者。
我有csv文件的格式,作者,出版物
Sanjeev Saxena,Parallel Integer Sorting and Simulation Amongst CRCW Models.
Hans-Ulrich Simon,Pattern Matching in Trees and Nets.
Nathan Goodman,NP-complete Problems Simplified on Tree Schemas.
Oded Shmueli,NP-complete Problems Simplified on Tree Schemas.
Norbert Blum,On the Power of Chain Rules in Context Free Grammars.
Arnold Sch,rpern der Charakteristik 2.
nhage,rpern der Charakteristik 2.
Juha Honkala,A characterization of rational D0L power series.
Chua-Huang Huang,The Derivation of Systolic Implementations of Programs.
Christian Lengauer,The Derivation of Systolic Implementations of Programs.我使用了以下查询:
USING PERIODIC COMMIT
LOAD CSV FROM 'file:/home/kanion/studia/bazy/clean.csv' AS line
CREATE (:Publikacja { author: line[1], title: line[2]})进口后,我有:
http://imgur.com/3lpWM3O
所以我认为作者不是进口的?怎么处理呢?
发布于 2015-05-16 16:04:43
在大多数(如果不是所有编程语言)中,数组的第一个键是0,所以它应该是作者的行,标题是line1。
USING PERIODIC COMMIT
LOAD CSV FROM 'file:/home/kanion/studia/bazy/clean.csv' AS line
CREATE (:Publikacja { author: line[0], title: line[1]})https://stackoverflow.com/questions/30277758
复制相似问题