1
votes

I'm totally new of neo4j and maven.

I'm using a batch-import tool to convert my mysql to neo4j. After compiling and converting from .csv, a target file containing graph.db is generated. Does it mean that I have successfully converted my .csv into neo4j? What should I do now?

Hope there is someone who can help me.

1
Oh, I roughly understand. I should first install the neo4j server on ubuntu and link the path to the target pointing to graph.dbstarry
You can either copy your target/graph.db to your /path/to/server/data/graph.db or you can edit conf/neo4j-server.properties to specify the full path to your created db as store-location. But move it somewhere else as the target directory will be cleaned whenever you run mvn cleanMichael Hunger
Make sure that the server is not running when you replace the graph.dbMichael Hunger
Thank you so much for your reply. I've solved my problem.starry

1 Answers

1
votes

You have a couple of options to inspect your converted data.

Java REST server

Download and install the Neo4j server. Connect to it via http://localhost:7474. Launch a cypher query to inspect your data. E.g. START n=node(*) RETURN n;.

Java embedded server

You could write a small java application that connects to your data directory. E.g.

public static void main(String[] args) throws Exception {
    final GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase("db");       
    final ExecutionEngine engine = new ExecutionEngine(graphDb);
    System.out.println(engine.execute("START n=node(*) RETURN n").dumpToString());
    graphDb.shutdown();
}