-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apoc.import.graphml doesn't work for edges #2659
Comments
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 5, 2022
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 5, 2022
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 6, 2022
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 11, 2022
ncordon
pushed a commit
that referenced
this issue
May 26, 2022
neo4j-oss-build
pushed a commit
that referenced
this issue
May 26, 2022
neo4j-oss-build
pushed a commit
that referenced
this issue
May 26, 2022
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 27, 2022
vga91
added a commit
to vga91/neo4j-apoc-procedures
that referenced
this issue
May 27, 2022
vga91
added a commit
that referenced
this issue
May 30, 2022
ncordon
pushed a commit
that referenced
this issue
Jun 15, 2022
ncordon
added a commit
that referenced
this issue
Jun 16, 2022
neo4j-oss-build
added a commit
that referenced
this issue
Jun 16, 2022
gem-neo4j
pushed a commit
to gem-neo4j/neo4j-apoc-procedures
that referenced
this issue
Jul 12, 2022
…eo4j-contrib#2853) (neo4j-contrib#2938) Co-authored-by: Giuseppe Villani <giuseppe.villani@larus-ba.it> Co-authored-by: Nacho Cordón <ncordon@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Statement
I am trying to export some data using the
apoc.export.csv.data
and then import usingapoc.import.graphml
.When I run
apoc.export.csv.data
for extracting both nodes and rels in a single file and then import that single file usingapoc.import.graphml
, it works fine.But for performance and parallelize it I am trying to run for nodes and rels separately.
So we get 2 files - one for nodes and other for relationships.
Then import each the nodes file first and then the relationship file.
However the problem is
apoc.import.graphml
works fine for the nodes but then fails for rels giving error as java null pointer exception.The Relationship file does have the source and target node ids so it should be able to load the data.
I can easily reproduce this using the following queries.
Reproducible steps
//Extract node files
MATCH (person:Person)-[actedIn:ACTED_IN]->(movie:Movie)
WHERE person.name starts with "K"
with collect(person)+collect(movie) as node
CALL apoc.export.graphml.data(node, [], "/Users/rohankharwar/Downloads/movies_nodes.graphml", {stream: false})
YIELD file, nodes, relationships, properties, data
RETURN file, nodes, relationships, properties, data;
//Extract Relationship files
MATCH (person:Person)-[actedIn:ACTED_IN]->(movie:Movie)
WHERE person.name starts with "K"
with collect(person)+collect(movie) as node, collect(actedIn) as rels
CALL apoc.export.graphml.data([], rels, "/Users/rohankharwar/Downloads/movies_rels.graphml", {stream: false})
YIELD file, nodes, relationships, properties, data
RETURN file, nodes, relationships, properties, data;
//graphml file import nodes
CALL apoc.import.graphml("file:///Users/rohankharwar/Downloads/movies_nodes.graphml", {readLabels:true})
//graphml file import rels
CALL apoc.import.graphml("file:///Users/rohankharwar/Downloads/movies_rels.graphml", {readLabels:true})
We get the following error (attached image)
Simple Dataset (where it's possibile)
I just used the movies dataset.
Versions
The text was updated successfully, but these errors were encountered: