Created
May 5, 2019 07:43
-
-
Save vladbatushkov/591517eedee6c0e2973d33c9c813c381 to your computer and use it in GitHub Desktop.
Create species, vehicles and starships.
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 spec | |
UNWIND value.vehicles AS vehicle | |
UNWIND value.starships AS starship | |
MERGE (:Species { name: spec.name, url: spec.url }) | |
MERGE (:Vehicle { name: vehicle.name, url: vehicle.url }) | |
MERGE (:Starship { name: starship.name, url: starship.url }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment