USING PERIODIC COMMIT LOAD CSV statement

139 views
Skip to first unread message

Marwa Elabri

unread,
Sep 26, 2016, 6:34:37 AM9/26/16
to Neo4j
I executed this statement using NEO4J verion 3.0 RC1

USING PERIODIC COMMIT LOAD 
CSV WITH HEADERS FROM 'file:\\C:\\Program Files\\PostgreSQL\\9.2\\data\\course.csv' AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty}); 

but I  get this error :
An unexpected failure occurred, see details in the database logs, reference number 2c7fc132-9b14-421c-b5af-1412938013bf.
However, I used it before and It runs 
please any help

Michael Hunger

unread,
Sep 26, 2016, 6:35:07 AM9/26/16
to ne...@googlegroups.com
Check the database logs and share the error?

I presume you mean the Neo4j driver?

Make sure you provide the csv data in the configured (in neo4j.conf) import directory.

You might also have one slash too much.

If you put your data into the import directory a file:///course.csv" should be good enough



On Mon, Sep 26, 2016 at 12:19 PM, Marwa Elabri <marwa...@gmail.com> wrote:
I execute this statement on neo4j version 1.1 RC-2 
USING PERIODIC COMMIT LOAD 
CSV WITH HEADERS FROM 'file:\\C:\\Program Files\\PostgreSQL\\9.2\\data\\course.csv' AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty}); 

but I  get this error :
An unexpected failure occurred, see details in the database logs, reference number 2c7fc132-9b14-421c-b5af-1412938013bf.
However, I used it before and It runs 
please any help

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marwa Elabri

unread,
Sep 26, 2016, 7:10:04 AM9/26/16
to Neo4j
This what I have in neo4j.conf

# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or uncomment it to
# allow files to be loaded from anywhere in filesystem; this introduces possible security problems. See the `LOAD CSV`
# section of the manual for details.
#dbms.directories.import=import


And this is the error in the database logs

03:48.655+0000 ERROR [o.n.b.v.r.i.ErrorReporter] org.neo4j.bolt.security.auth.AuthenticationException: Authentication token must contain: 'scheme : basic' (ID:28EC794B7F093B1D0FBD23024CAB4B2228146F579ACA218C903B24AEF2B137C9)
at org.neo4j.bolt.security.auth.BasicAuthentication.authenticate(BasicAuthentication.java:58)
at org.neo4j.bolt.v1.runtime.internal.StandardStateMachineSPI.authenticate(StandardStateMachineSPI.java:116)
at org.neo4j.bolt.v1.runtime.internal.SessionStateMachine$State$1.init(SessionStateMachine.java:77)
at org.neo4j.bolt.v1.runtime.internal.SessionStateMachine.init(SessionStateMachine.java:641)
at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorkerFacade.lambda$init$2(SessionWorkerFacade.java:61)
at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorkerFacade$$Lambda$177/1559497201.accept(Unknown Source)
at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorker.execute(SessionWorker.java:116)
at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorker.run(SessionWorker.java:77)
at java.lang.Thread.run(Unknown Source)


I tried this one 
LOAD CSV WITH HEADERS FROM "file:///C:/Program Files/PostgreSQL/9.2/data/course.csv" AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty});

But Igot the same error
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.

Marwa Elabri

unread,
Sep 26, 2016, 7:17:33 AM9/26/16
to Neo4j
Sorry when I made this
I tried this one 
LOAD CSV WITH HEADERS FROM "file:///C:/Program Files/PostgreSQL/9.2/data/course.csv" AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty});

But Igot the this error 
Caused by: org.neo4j.cypher.internal.frontend.v3_0.SyntaxException: Invalid input 'c': expected '\', ''', '"', 'b', 'f', 'n', 'r', 't', '_', '%', UTF16 or UTF32 (line 1, column 82 (offset: 81))

Michael Hunger

unread,
Sep 26, 2016, 7:29:38 AM9/26/16
to ne...@googlegroups.com
Please use a released version, like 3.0.6


--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

Marwa Elabri

unread,
Sep 26, 2016, 7:32:54 AM9/26/16
to Neo4j
Now I remove 
#dbms.directories.import=import from neo4j.conf 
to allow file to be loaded from anywhere  and I execute these statements 

USING PERIODIC COMMIT LOAD 
CSV WITH HEADERS FROM 'file:/C:/Program Files/PostgreSQL/9.2/data/course.csv' AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty});


USING PERIODIC COMMIT LOAD 
CSV WITH HEADERS FROM 'file:///C:/Program Files/PostgreSQL/9.2/data/course.csv' AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty});

USING PERIODIC COMMIT LOAD 
CSV WITH HEADERS FROM 'file:\\C:\\Program Files\\PostgreSQL\\9.2\\data\\course.csv' AS row 
CREATE (:Course {name: "Course" + row.id, difficulty: row.difficulty});


but always it says that the I have illegal caracters in the path


please help

Michael Hunger

unread,
Sep 26, 2016, 7:33:17 AM9/26/16
to ne...@googlegroups.com
Probably something about the escaping.

The other issue you got were missing or wrong username/password.

To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

Marwa Elabri

unread,
Sep 26, 2016, 7:40:03 AM9/26/16
to Neo4j
I don't put my user name and passeword where I have to write them and how
Reply all
Reply to author
Forward
0 new messages