Last active
August 23, 2016 16:15
-
-
Save jexp/f1b6b514515d9a539f423b0bc0ce2713 to your computer and use it in GitHub Desktop.
load grap content from http://onodo.org visualizations into Neo4j using the apoc procedure library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call apoc.load.json("https://onodo.org/api/visualizations/21/nodes/") yield value | |
create (n:Person) set n+=value | |
with count(*) as nodes | |
call apoc.load.json("https://onodo.org/api/visualizations/21/relations/") yield value | |
match (a:Person {id:value.source_id}) | |
match (b:Person {id:value.target_id}) | |
call apoc.create.relationship(a,value.relation_type,{},b) yield rel | |
return nodes, count(*) as relationships |
Author
jexp
commented
Aug 21, 2016
- you need to run Neo4j with at least java-8 build 101 for this to work, as the let's encrypt ssl certificate is only available in the Java keystore from that version
- you can find APOC here: https://github.com/neo4j-contrib/neo4j-apoc-procedures
- grab a binary release from: https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases (best the upcoming 3.0.4.x)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment