Created
August 31, 2022 03:10
-
-
Save neylsoncrepalde/a1dea5bace7cb7665263a2a248b61397 to your computer and use it in GitHub Desktop.
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
LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/neylsoncrepalde/lazega_lawyers_csv/main/lawyers_attributes.csv' | |
AS row FIELDTERMINATOR ';' | |
WITH row WHERE row.id IS NOT NULL | |
MERGE (p:Person {name: row.id}) | |
SET p.status = row.status | |
SET p.sex = row.sex | |
SET p.office = row.office | |
SET p.tenure = toInteger(row.tenure) | |
SET p.age = toInteger(row.age) | |
SET p.practice = row.practice | |
SET p.school = row.school; | |
LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/neylsoncrepalde/lazega_lawyers_csv/main/lawyers_advices.csv' | |
AS row FIELDTERMINATOR ';' | |
WITH row WHERE row.sender IS NOT NULL | |
MATCH (v:Person {name: row.sender}) | |
MATCH (p:Person {name: row.receiver}) | |
MERGE (v)-[:ASK_ADVICE]->(p); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment