You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cory Waddingham I have a customer who is running a query that’s returning more nodes than exist in his database. the query is:
MATCH path = (node)-[*1]->()
WITH collect(path) AS paths
CALL apoc.graph.fromPaths(paths, "mygraph", {})
YIELD graph AS g
CALL apoc.static.set("mygraph.cached", g)
YIELD value
RETURN value, g
says he gets 8 nodes, 4 relationships, and 23 properties, but he claims to only have 5 nodes, 4 relations, and 14 properties (not sure how he knows that, I’ve asked and am waiting a response). any thoughts on why there might be a mismatch? other than him being wrong about the number of nodes in his db?
Michael Hunger good question, I think so far we mostly exported from a real graph not a virtual one, that's why the APOC issue would make most senes
Cory Waddingham the query being used for the export originally was
CALL apoc.export.csv.graph(apoc.static.get("mygraph.cached"), null, {stream: true})
YIELD file, nodes, relationships, properties, data
RETURN file, nodes, relationships, properties, data
Cory Waddingham since this in Aura it has to be exported to a stream, saving to a file isn’t an option
Cory Waddingham this query seems to solve his issue
MATCH (n1)-[r]-()
WITH collect(distinct n1) as n1s, collect(r) as rs
CALL apoc.export.csv.data(n1s,rs,null,{stream: true})
YIELD file, nodes, relationships, properties, data
RETURN file, nodes, relationships, properties, data
Michael Hunger I don't know why he needs to store it
Cory Waddingham my guess is that’s the function he knows and has used before so it was the first one he went to :man-shrugging::skin-tone-3:
Michael Hunger I think it could be a missing/overlooked issue between the graph export and graph creation that didn't show up in the testing so far
Michael Hunger thanks a lot for the details, and the issue is only duplicate nodes in the output?
Cory Waddingham it could be yeah
Cory Waddingham yw, and yes, that’s correct
Michael Hunger ok
Cory Waddingham the dupes all have the same node ID, too, if that helps
Cory Waddingham so it should be possible to use that as a filter
The text was updated successfully, but these errors were encountered:
see discussion below
Cory Waddingham I have a customer who is running a query that’s returning more nodes than exist in his database. the query is:
says he gets 8 nodes, 4 relationships, and 23 properties, but he claims to only have 5 nodes, 4 relations, and 14 properties (not sure how he knows that, I’ve asked and am waiting a response). any thoughts on why there might be a mismatch? other than him being wrong about the number of nodes in his db?
Michael Hunger good question, I think so far we mostly exported from a real graph not a virtual one, that's why the APOC issue would make most senes
Cory Waddingham the query being used for the export originally was
Cory Waddingham since this in Aura it has to be exported to a stream, saving to a file isn’t an option
Cory Waddingham this query seems to solve his issue
Michael Hunger I don't know why he needs to store it
Cory Waddingham my guess is that’s the function he knows and has used before so it was the first one he went to :man-shrugging::skin-tone-3:
Michael Hunger I think it could be a missing/overlooked issue between the graph export and graph creation that didn't show up in the testing so far
Michael Hunger thanks a lot for the details, and the issue is only duplicate nodes in the output?
Cory Waddingham it could be yeah
Cory Waddingham yw, and yes, that’s correct
Michael Hunger ok
Cory Waddingham the dupes all have the same node ID, too, if that helps
Cory Waddingham so it should be possible to use that as a filter
The text was updated successfully, but these errors were encountered: