0
    neo4j-sh (?)$ MATCH (n:toy) - [rel:`buy_vendor`] -> (vc)
    WITH rel,n
    SET rel.mt=n.buy_type;

    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
            java.io.EOFException
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:236)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
            at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
            at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
            at com.sun.proxy.$Proxy1.interpretLine(Unknown Source)
            at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:147)
            at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:131)
            at org.neo4j.shell.impl.AbstractClient.grabPrompt(AbstractClient.java:99)
            at org.neo4j.shell.StartClient.grabPromptOrJustExecuteCommand(StartClient.java:412)
            at org.neo4j.shell.StartClient.startRemote(StartClient.java:359)
            at org.neo4j.shell.StartClient.start(StartClient.java:229)
            at org.neo4j.shell.StartClient.main(StartClient.java:147)
    Caused by: java.io.EOFException
            at java.io.DataInputStream.readByte(DataInputStream.java:267)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:222)
            ... 11 more
    neo4j-sh (?)$

I am trying to update more than 1 million records. Is there a way to update in batches. Is there a better way to query the database and update the relationship for a property.

vinsent paramanantham
  • 953
  • 3
  • 15
  • 34

2 Answers2

0

Could be a referred column name is not there from the load file... check the column names... wild guess..

vinsent paramanantham
  • 953
  • 3
  • 15
  • 34
0

Use apoc.periodic to update a large number of nodes at once.

CALL apoc.periodic.commit("
  MATCH (n:toy) - [rel:buy_vendor] -> ()
  WITH rel,n
  SET rel.mt=n.buy_type;
RETURN count(*)
", { limit : 50000});

You should first add apoc jar to Neo4j pluguins

Hope this help you !

Morito
  • 93
  • 2
  • 13