Created
June 14, 2020 17:52
-
-
Save samredai/4655e113fb2e562991b93a9716d13f16 to your computer and use it in GitHub Desktop.
Cypher: Create relationships between random nodes
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
MATCH (p:Person), (l:Location) | |
WITH p, l, rand() as r | |
ORDER BY r | |
LIMIT 100000 | |
WHERE rand() < 0.1 | |
MERGE (p)-[:LIKES]->(l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment