Database Reference
In-Depth Information
This is why Neo Technology and its community have developed an alternative way
of creating Neo4j data stores without having the Neo4j server running. This allows
the import process to be executed in an all or nothing fashion, without doing
intermediate commits on the underlying component transactions. The import will
either succeed or fail in its entirety. This nontransactional approach to importing
is much faster—literally bringing down imports that would take hours in a
transactional fashion to minutes or even seconds in a nontransactional import.
The batch importer, as this tool is called, is not bundled with Neo4j. At the time of
writing this topic, you can download this tool from https://github.com/jexp/
batch-import/tree/20 and follow the installation instructions to get it active on
your system. Once you do this, we can take a look at how this batch import process
works with the help of the following diagram:
The batch import process
Aswiththepreviousimportscenarios,wewillstartwiththesameCSViles.
However,inorderforthesetoitthemorespeciicformatofthebatchimporter,
we have to make a few changes:
• Thecolumnsoftheileshavetobetabseparated,notcommaseparated.
Aind/replaceoperationisrequiredduetothechangeintheilestructure
from the original format that we used in the previous scenarios to this one.
• Therelationshipilehasaspeciicformatthatyouneedtorespect,
includingaspeciicwayofreferencingthenodesthatareusedinbuilding
the relationships. Essentially, it boils down to using the row number of the
nodesileasstart/endidentiiers,knowingthattheirstdatarow(whichis
thesecondrowoftheile)isreferredtoasthe0row.So,thereisabitofdata
modiicationthatwehavetodoonouriletomakethiswork,asyoucan
see from the following screenshot. Here's the new nodes.csv ile:
 
Search WWH ::




Custom Search