Created
May 5, 2019 07:50
-
-
Save vladbatushkov/2c60659516f06500d4b98c583b8dce22 to your computer and use it in GitHub Desktop.
Species to planet as a homewolrd relationship.
This file contains hidden or 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
WITH "https://vbatushkov.bitbucket.io/swapi.json" AS url | |
CALL apoc.load.json(url) YIELD value | |
UNWIND value.species as species | |
MATCH (spec:Species { url: species.url }) | |
MATCH (p:Planet { url: species.homeworld }) | |
MERGE (spec)-[:HOMEWORLD]->(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment