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
// NOTE, check if statement is correct, it speeds up process dramatically (100-1000x) | |
CREATE CONSTRAINT ON (u:User) ASSERT u.address IS UNIQUE; | |
// Not necessary if 4G is available | |
// :auto USING PERIODIC COMMIT 500 | |
LOAD CSV WITH HEADERS FROM 'file:///circles_hub_trust_events.csv' AS row | |
MERGE (u1:User {address: row.truster}) | |
MERGE (u2:User {address: row.trustee}) | |
MERGE (u1)-[r:TRUSTS]->(u2) |