Today we added a plug-in to the 2.1 version of the community edition of GraphDB which is called “FastImport”. It’s basically a bulk import plug-in which takes a proprietary XML format as input and imports vertices and edges into a running GraphDB instance.
In order to use this new plug-in and import feature you need to know that an import basically splits into a two-stage process:
- scheme setup
- fast-import
So first you’ll have to define which vertex and edge types get imported by the following step 2 – you normally do this using the GraphQL and specifying several vertex types. For demonstration purposes we take a small social network with only one vertex type:
CREATE VERTEX TYPE User ATTRIBUTES (String Name, Int64 Age, Set<User> Friends)
After having set-up the scheme the only thing left is to actually call the import plug-in using another short GraphQL query:
IMPORT FROM ‘file:\\100k_import.xml’ FORMAT FastImport
This will, for example, take the 100.000 user dataset and import it into the current GraphDB instance. Of course we did that already for you so here are the comparison results between a GraphQL and FastImport and the persistent and In-Memory version of GraphDB:
Of course you can also download the data-sets used in this small benchmark here:
10.000 Users / 592.374 edges : GraphQL Import , FastImport
100.000 Users / 5.944.332 edges : GraphQL Import, FastImport
