0

我想将出版物从 csv 导入 neo4j。并进行查询,它将选择所有作为出版物作者或至少一位作者的作者。

我有格式为 Author,Publication 的 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

所以我认为作者不是进口的?如何处理?

4

1 回答 1

2

在大多数(如果不是全部)编程语言中,数组的第一个键是 0,因此它应该是 line[0] 的作者和 line[1] 的标题

USING PERIODIC COMMIT
LOAD CSV FROM 'file:/home/kanion/studia/bazy/clean.csv' AS line
CREATE (:Publikacja { author: line[0], title: line[1]})
于 2015-05-16T16:04:43.680 回答