Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-07-2019 02:32 AM
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?
04-07-2019 03:47 AM
I suggest rather to use apoc.export.cypher for that and use
Otherwise, please create an GitHub issue for the problem you ran into.
04-10-2019 02:17 AM
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.
04-11-2019 12:37 AM
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.
04-07-2019 01:30 PM
Can you please open an issue here?
With a sample dataset in order to reproduce the problem.
Thanks a lot!
All the sessions of the conference are now available online