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
Yes, entities are duplicated during export.
In fact, executing:
CREATE (p:Person {id: 1})-[r:ACTED_IN]->(m:Movie {foo: 1}) with p
CREATE (p)-[:ACTED_IN]->(:Movie {foo: 2})
and then:
MATCH (p:Person)-[r:ACTED_IN]->(m:Movie)
with collect(p) + collect(m) as nodes, collect(r) as rels
call apoc.export.json.data(nodes, rels, "testData.json", {})
yield file return file
The issue also occurs with other procedures, such as csv, Cypher.
Moreover, it happens also with the apoc.export.<type>.graph procedures:
MATCH (p:Person)-[r:ACTED_IN]->(m:Movie)
with collect(p) + collect(m) as nodes, collect(r) as rels
call apoc.export.json.graph({nodes: nodes, relationships: rels}, "testGraph.json", {})
yield file return file
With the query, such as the following, the result is duplicated, but I think in this case it is right,
since each Cypher row result corresponds to an entry in the json/csv/... file:
I'm not sure if we're de-duplicating entities in apoc.export.json.data/query
e.g. if you have a query like
where people and movies can appear multiple times.
or
where even relationships can be duplicated.
Are we keeping track in a set of ids or so. Please check.
The text was updated successfully, but these errors were encountered: