ingraph
ingraph copied to clipboard
Use APOC CSV loader to generate expected results
Our current workflow for generating expected test result looks as follows:
- Generate/handcraft the CSV files of the inputs.
- Fire up a Neo4j 3.0 instance with the Neo4j shell tools.
- Load the data with
neo4j-import
. - Export the data to a GraphML file with
neo4j-shell
. - Load it with the
org.neo4j.shell.tools.imp.format.graphml.XmlGraphMLReader
class of the import tools JAR.
This is far too complicated, so we should simplify this and load the data with Cypher instead. However, this would require us to implement 30+ LOAD CSV
queries manually.
I discussed this on the Neo4j users slack and it seems that implementing a stored procedure would be the best way to do this: https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/489
The stored procedure is almost ready, but this will only be required by the Social Network Benchmark.
However, this would require us to implement 30+ LOAD CSV queries manually.
Okay, almost three month later I realized that we could just use APOC's GraphML export/import, which is a lot simpler.
It turned out that GraphMLs are a lot more complicated to maintain (the CSVs are no longer a 'single source of truth'), so we should implement this, especially that https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/489 was resolved this summer.