cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Graphml Export/Import problems - prolog error

I am trying to move my database from one server running community edition, to another running enterprise.
I export my files using
<apoc.export.graphml.all('/var/lib/neo4j/import/complete-graph-april.graphml', {cypherFormat:"updateAll"})/>

And import using
<call apoc.import.graphml('file:///var/lib/neo4j/import/complete-graph-april.graphml',{batchSize: 4000})/>

But i get this error.
<"Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.import.graphml: Caused by: java.util.NoSuchElementException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog."/>

The start of my file looks like:
<BEGIN
CREATE (:species:UNIQUE IMPORT LABEL {description:"Gibberella zeae, also known by the name of its anamorph Fusarium graminearum, is a plant pathogen which causes fusarium head blight, a devastating disease on wheat and barley.", gene_count:13317, kingdom:"Fungi", name:"Fusarium graminearum", taxonomy_id:5518, UNIQUE IMPORT ID:0});
CREATE (:kingdom:UNIQUE IMPORT LABEL {name:"Fungi", UNIQUE IMPORT ID:1});
CREATE (:species:UNIQUE IMPORT LABEL {gene_count:19526, kingdom:"Plant", name:"Chlamydomonas reinhardtii", taxonomy_id:3055, UNIQUE IMPORT ID:2});
CREATE (:kingdom:UNIQUE IMPORT LABEL {name:"Plants", UNIQUE IMPORT ID:3});/>

I also tried to export it using the cypher export, that gives no errors but is incredibly slow, 20 minutes for maybe 100 nodes.

On machine A, running community edition:
<CALL apoc.export.cypher.all("/var/www/lib/neo4j/import/graph.cypher",{format:'neo4j-shell',separateFiles:true});/>

On machine B: running enterprise
<call apoc.cypher.runSchemaFile('file:///var/lib/neo4j/import/graph.schema.cypher');/>
<call apoc.cypher.runFiles(['file:///var/lib/neo4j/import/graph.nodes.cypher','file:///var/lib/neo4j/import/graph.relationships.cypher']);/>

Anybody know what I might have been doing wrong?

4 REPLIES 4

I suggest rather to use apoc.export.cypher for that and use

Otherwise, please create an GitHub issue for the problem you ran into.

I tried the cypher export and then import using either apoc.runFiles or cypher-shell but both takes very long time. In the range of 10 hours for 7 million nodes and my 60 million edges are still running. Is there any settings that can be changed for optimizing this speed?

I will create an issue just need to get it up and running first.

This will get better with the next release which is due this week and the new release of cypher-shell 1.1.9 which was also this week.

conker84
Graph Voyager

Can you please open an issue here?

With a sample dataset in order to reproduce the problem.
Thanks a lot!