Skip to content
This repository has been archived by the owner on Dec 2, 2017. It is now read-only.

idio/graphson2csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Graphson2csv

Dumps huge Graphson's into CSV files which can be fed into Neo4j Batch importer.

  • Json Parsing is done via Streaming so it can handle huge Graphsons

Compile

  • Make sure you are using Java 7
  • mvn package
  • mvn assembly:single

Usage

  • <path_to_graphson>: Path to graphson.json
  • <output_folder> : Folder where nodes.csv and relationships.csv will be generated
  • nodeProperty : Stands for the property names of the nodes in the graph i.e: age
  • type : Stands for the type of a node property. i.e: string, int..
java -server -Xmx4G -jar target/BatchTools-1.0-SNAPSHOT-jar-with-dependencies.jar
json2csv <path_to_graphson> <output_folder>  nodeProperty1:type,nodeProperty2:type...

Getting a Graphson out of Neo4j Database

In the Gremlin shell do:

g = new Neo4jGraph('../path_to_neo4j/graph.db');  
g.saveGraphSON('..output_path/jsongraph.json');

Importing CSV into Neo4j

The files generated by this tool can be fed into:

Releases

No releases published

Packages

 
 
 

Languages