问题
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