Importing graph data: Amazon Neptune
To import data into Amazon Neptune, you have a several options depending on your needs.
Importing data
Neptune supports importing data using:
- SPARQL
INSERT
statements - Gremlin
addV
andaddE
steps - From CVS files in the Gremlin data-format or OpenCypher data format
- From RDF files
Migrating data using Amazon Data Migration Service (DMS)
Neptune supports migrating data from another source using Amazon DMS. Please refer to the list of supported sources for data migration.
Migrating data from Neo4j
If you are migrating data from Neo4j to Neptune, the steps are:
- Use APOC to dump your Neo4j data in the CSV format
- Open a Neo4j console or browser
- Export the graph to CSV by running this Cypher command:
CALL apoc.export.csv.all("neo4j-export.csv", {d:','})
- Convert your Neo4j dump using the neo4j-to-neptune converter
- Clone the repository by running
git clone git@github.com:awslabs/amazon-neptune-tools.git
- Build the JAR by running
mvn package
in./amazon-neptune-tools/neo4j-to-neptune/
- Convert the CSV by running
java -jar ./amazon-neptune-tools/neo4j-to-neptune/target/neo4j-to-neptune.jar convert-csv -i ./neo4j-export.csv -d output --infer-types
- Clone the repository by running
- Use the Neptune bulk loader to import the data in Neptune