neo4j LOAD CSV with Tabs

為{幸葍}努か 提交于 2020-04-13 05:00:09

问题


I am trying to load a csv and create nodes in neo4j 2.1.0 using the following:

USING PERIODIC COMMIT LOAD CSV FROM "file://c:/temp/listings.TXT" AS line FIELDTERMINATOR '\t' CREATE (p:person { id: line[0] });

The columns are separated using 0x9 (tab) characters. But the created nodes have the entire row content in the id.

Any help is greatly appreciated.


回答1:


try FIELDTERMINATOR '\\t'
that's what worked for me




回答2:


Try casting toint(line[0]) since the default type when importing is string.




回答3:


Open your csv file with notepad++ and try to delete the (") or to replace them with spaces.

I had the same problem but when I removed all the characters " it worked

enter image description here



来源:https://stackoverflow.com/questions/23701507/neo4j-load-csv-with-tabs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!