Created
September 2, 2014 20:18
-
-
Save EdWarga/23b068f8bf51f8200f14 to your computer and use it in GitHub Desktop.
Cyoher - load divinity data
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
-------------------------------------------- | |
DIVINITY | |
LOAD NODES: | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Article-node.csv" AS csvLine | |
CREATE (a:Article { id: csvLine.ArtID, title: csvLine.Title, year: toInt(csvLine.PubYear) }) | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Author-node.csv" AS csvLine | |
CREATE (p:Person { id: csvLine.AutID, name: csvLine.Author }) | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Journal-node.csv" AS csvLine | |
CREATE (j:Journal { id: csvLine.JID, journal: csvLine.Journal, ISSN: csvLine.ISSN }) | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Topic-node.csv" AS csvLine | |
CREATE (t:Topic { id: csvLine.TpcID, topic: csvLine.Topic }) | |
--------------------------------------------------------------------------- | |
LOAD RELATIONSHIPS: | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Author-rel.csv" AS csvLine | |
MATCH (person:Person {id: csvLine.AutID}),(article:Article { id: csvLine.ArtID}) | |
CREATE person-[:WROTE]->article | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Journal-rel.csv" AS csvLine | |
MATCH (article:Article { id: csvLine.ArtID}),(journal:Journal { id: csvLine.JID}) | |
CREATE article-[:PUBLISHEDIN]->journal | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Topic-rel.csv" AS csvLine | |
MATCH (article:Article {id: csvLine.ArtID}),(topic:Topic {id: csvLine.TpcID}) | |
CREATE article-[:ISABOUT]->topic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment