Skip to content

Instantly share code, notes, and snippets.

@Meatballs1
Created August 2, 2017 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Meatballs1/7f50b721c8a5c125f3d3a42b82f54445 to your computer and use it in GitHub Desktop.
Save Meatballs1/7f50b721c8a5c125f3d3a42b82f54445 to your computer and use it in GitHub Desktop.
Anonymize user names in Neo4j APOC
MATCH (u:user)
WITH u, apoc.text.join(apoc.coll.randomItems(split("abcdefghijklmnopqrstuvwxyz0123456789",""), 12, true),"") as identifier
SET u.name=identifier
RETURN COUNT(u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment