Skip to main content
Version: 2.0

How to import data from a local file

Users can upload data to ONgDB by adding the local file to ONgDB's data directory.

This can be done by dragging and dropping the local data file(s) via the system file manager.

ONgDB import directory

Users should store the local data file(s) to be imported in ONgDB's import directory as shown here:

.
└── GraphGrid Project Directory/
└── data/
└── ongdb/
└── import/
└── your-data.json

Loading into ONgDB

Once the local data files are added to the ONgDB import directory, it can be loaded in by using the appropriate apoc.load procedure. After the file is loaded in, the data can be unwound and added to the graph.

For example this JSON file in the import directory contains the following:

{
"person":{
"name": "Bob",
"title": "employee"
}
}

Running this query in the ONgDB browser loads the JSON file in, and creates a Person node with the properties name and title based on the JSON data:

CALL apoc.load.json('file:///example-import-data.json') YIELD value WITH value UNWIND value.person as person MERGE (p:Person {name: person.name, title: person.title}) RETURN p