I am working on 1 Use case where we are merging all nodes(with 1 common property, such as all nodes with year= "2016" in Movie.csv table below) into 1 node where all the relationships are heading towards it rather than 3 different nodes.
I have 3 csv files with below type of data.
|Movie Id||Movie Name||Year||Actor Id||Director Id|
|Director ID||Director Name|
Now I merged all the Movie nodes into 1 node using
apoc.refractor.mergenodes from APOC library.
Now when I request the data as a TABLE (not Graph) like:-
Match (a:Actor)-[:ACTED_IN]->(m:Movie)-[:DIRECTED_BY]->(d:Director) return a.Name, m.Movie_Name,d.Director_Name
Ideally I should get only 3 rows with above mentioned info.
But I get more rows than I am supposed to.
Please help me identify what is the reason and how to fix it.
(I think the issue is that each actor to movie realtionship is giving cartesian product with other 3 relationships of movie to director)
NOTE:-I am using Neo4j Browser version 3.1.4