无法合并节点错误:Neo4j [英] Cannot Merge Node error: Neo4j

查看:4280
本文介绍了无法合并节点错误:Neo4j的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个CSV文件,我想转换为Neo4j数据库。它们看起来像这样:

I have 2 CSV files which I want to convert into a Neo4j database. They look like this:

first file:

name,enzyme
Aminomonas paucivorans,M1.Apa12260I
Aminomonas paucivorans,M2.Apa12260I
Bacillus cellulosilyticus,M1.BceNI
Bacillus cellulosilyticus,M2.BceNI

second file 

name,motif
Aminomonas paucivorans,GGAGNNNNNGGC
Aminomonas paucivorans,GGAGNNNNNGGC
Bacillus cellulosilyticus,CCCNNNNNCTC

正如你可以看到的共同的因素是有机体的名称和。每个有机体将有几个酶,每个酶将有1个母题。基序可以在酶之间相同。我使用以下语句创建我的数据库:

As you can see the common factor is the Name of the organism and the. Each Organism will have a few Enzymes and each Enzyme will have 1 Motif. Motifs can be same between enzymes . I used the following statement to create my database:

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:C:/Users/Desktop.n_e.csv" AS csvLine
MATCH (o:Organism { name: csvLine.name}),(e:Enzyme { name: csvLine.enzyme})
CREATE (o)-[:has_enzyme]->(e)

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:C:/Users/Desktop/n_m.csv" AS csvLine
MATCH (o:Organism { name: csvLine.name}),(m:Motif { name: csvLine.motif})
CREATE (o)-[:has_motif]->(m) 

但是我一直收到错误无法合并节点使用null属性值名称URL'文件:C:/Users/Desktop/n_e.csv'在第2行。似乎没有提交行。注意,这些信息可能不准确。)。我google了这个问题,但没有工作的解决方案。我确保我的 CSV 是vanillacsv(没有空格,只有逗号分隔)。但我不断得到这个问题。我使用 2.1.3 版本的Neo4j。任何帮助将受到高度赞赏。

However I keep getting the error Cannot merge node using null property value for name (Failure when processing URL 'file:C:/Users/Desktop/n_e.csv' on line 2. No rows seem to have been committed. Note that this information might not be accurate.). I googled the issue but got no working solution to this. I made sure my CSV is "vanilla" csv (no spaces, only comma separated). but I keep getting this problem. i am using the 2.1.3 version of Neo4j. Any help will be greately appreciated.

文件1: n_e.csv
文件2: n_m.csv

推荐答案


  1. 更新到2.1.5

  2. 阅读这篇博客文章, http://jexp.de/blog/2014/06/load-csv-into-neo4j-quickly-and-successfully/rel =nofollow>您的资料已正确读取。

  3. 也可以检查您没有Windows换行符或UTF 2字节文件前缀

  4. 检查您的索引:Organism(name) :酶(名称)和:Motif(名称)到位

  1. Update to 2.1.5
  2. read this blog post on how to check that your data is read correctly.
  3. Also you might check that you don't have windows newlines or an UTF 2-byte file preamble
  4. check that you have an index for :Organism(name) and :Enzyme(name) and :Motif(name) in place

一般来说,尝试一下并检查输出:

In general try this and check the outputs:

LOAD CSV WITH HEADERS FROM "file:C:/Users/Desktop.n_e.csv" AS csvLine
RETURN csvLine
LIMIT 5

LOAD CSV WITH HEADERS FROM "file:C:/Users/Desktop.n_e.csv" AS csvLine
RETURN csvLine.name,csvLine.enzyme 
LIMIT 5

这篇关于无法合并节点错误:Neo4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆