I removed the βtopicβ properties from the producer and consumer entities. That information is represented by the relationship to the corresponding topic, as such it should not be saved in the producer or consumer nodes.
LOAD CSV FROM 'file:///path/pubsub.tsv' AS line
MERGE (producer:Producer {name: line[0]})
MERGE (topic:Topic {name: line[1]})
MERGE (consumer:Consumer {name: line[2]})
MERGE (producer)-[:PUBLISH]->(topic)
MERGE (consumer)-[:SUBSCRIBE]->(topic)
Thanks @glilienfield
How do I get it to display the graph pls?
I put RETURN producer, topic, consumer at the end but it is still not displaying the graph with relationship. It only shows the nodes.
@glilienfield It is working now. I think the problem was with the neo4j interpreter in my zeppelin notebook as same script works in neo4j desktop for MacOS.
Thanks for your assistance