I am fairly new to Neo4j and am struggling with exporting a graph with virtual relationships. The original graph has patterns like
However, for the moment I'm only interested in the relationship between nodes n and m. So, I used the virtual Relationship method to get this projection. I would like to export this graph and use some algorithms from the graph data science library, but I seem not to be able to export the graph.
Any help would be greatly appreciated.
As the name suggests a "virtual" relationship does not physically exists, it's just created in the response of a query. All the export functions in APOC do allow for exporting based on a cypher query returning nodes and relationships, see https://neo4j.com/labs/apoc/4.1/export/graphml/#export-graphml-cypher-query for an example.
Instead using real relationship you can of course return virtual relationships as well (haven't tried myself, but it should work).