Importing data from InfiniteGraph to Neo4j
There are tons of options available when it comes to graph databases, such as FlockDB, AllegroGraph, InfiniteGraph, OrientDB, and so on. It is important to learn how to migrate data from any one of these to Neo4j if you are thinking of migrating to Neo4j.
In this recipe, you will learn how to migrate data from InfiniteGraph to the Neo4j server.
Getting ready
To get started with this recipe, install Neo4j by using the steps from the earlier recipes of this chapter.
How to do it...
InfiniteGraph, a product of Objectivity, Inc., is an enterprise-proven, distributed graph database that can handle the needs of big data.
The best way to import data from InfiniteGraph to Neo4j is via Gremlin, as shown here:
gremlin> import com.tinkerpop.blueprints.impls.ig.* gremlin> graph = new IGGraph("neo_data.boot") gremlin> graph.V # Gives all the nodes gremlin> graph.E # Gives all the edges gremlin> graph.loadGraphML('graph.xml'); gremlin> graph = new Neo4jGraph('neo/graph.db'); gremlin> graph.loadGraphML('graph.xml');
Infinite supports Blueprints, so it works with Gremlin, which means that all the methods also work with InfiniteGraph.
How it works...
Gremlin is a graph traversal language. Gremlin works over those graph databases/frameworks that implement the Blueprints property graph data model. Fortunately, OrientDB and Neo4j are among them.
There's more…
To know more about Gremlin, go to http://www.tinkerpop.com/.