3
votes

While try to upload the data to Neo4j 2.1 through LOAD CSV command, its not responding and even doesn't throw any exception while try with invalid path. Any comments

LOAD CSV FROM "file:///d:/import.csv" AS csvLine
MERGE (p:Person { name: csvLine[0]})
MERGE (m:Movie { title: csvLine[1]})  
CREATE (p)-[:PLAYED { role: csvLine[2]}]->(m)

enter image description here

2
Did you try to use the Neo4jShell ? E.g. via the web-console ? http://localhost:7474/webadmin/#/console/ (Remember to add a semicolon at the end then). And can you check data/log/console.log for any error messages?Michael Hunger
Tried it, and it seems to report the error correctly: /d:/import.csv (No such file or directory) Neo.TransientError.Network.UnknownFailureMichael Hunger
@MichaelHunger but i haven;t get error while try it, did u get any error or informationJeevanantham
Uploaded successfully when execute through http://localhost:7474/webadmin/#/console/.. thanks.. but why it doesn't executing in default execute pageJeevanantham
This feature is brand new and it will probably be fixed. Also, uploading trough the browser probably includes a few security restrictions that the Terminal doesn't have. Either way I still use my trusty Perl script to eat the CSV and generate the Cypher needed... Best for smaller tables, though, since Cypher is rather verbose in comparison.Kebman

2 Answers

1
votes

Sorry to hear you're having issues. Please refresh the browser's cache to use the LOAD CSV statement.

This is a bug in the milestone release. I've opened an issue on GitHub: https://github.com/neo4j/neo4j/issues/2215

When upgrading Neo4j 2.0.1 to 2.1.0-M01 the JS file containing the client-side validation for Cypher is returning as a cached version of the previous release. Because of this, users trying to use the LOAD CSV feature by either start word "LOAD" or "USING" will receive a red alert that says ":help". To prevent this issue, the reference URI of the JS files should contain a query string key-value pair "...?version=2.1.0-M06" or the file name should be changed for each release to include the release version.

Current work-around: Refresh your browser cache for the page (CTRL+F5 on Windows, SHIFT+F5 on Mac OSX).

0
votes

When loading on Windows user file:C:/whatever (note no // or /// forward slahes after the 'file' protocol...

http://www.neo4j.org/graphgist?d788e117129c3730a042