Support for creating multiple relationships from array
Marc Jordan
Use-Case: I've exported data from an Identity Provider and want to model groups and group memberships. In my input CSV, all Id's are in a single cell for 'members'. I'd like to be able to have relationships created between the referencedId and group. Workaround was to create relationships after the fact with:
MATCH (g:Group) WHERE g.CN = "<Group Name>"
MATCH (u:User) WHERE u.Emp_ID in [<Array of Employee Id's>]
CREATE (u)-[:memberOf]->(g)
Gregory King
Thanks for confirming. We're thinking about how we may want to support loads from JSON, this may be a subset of that problem.
Marc Jordan
Gregory King: Thanks Greg, that's correct (or close enough, group is column 1 and users is column 2 in my current dataset).
Cheers
Marc
Gregory King
Hey Marc,
Thanks for your feedback. Just to confirm, your dataset looks something like this:
USER | GROUPS
user1 | group1, group2, group3
user2 | group1, group5
and you'd like to be able to create / link to members for each of the groups embedded in the groups column?
Thanks,
Greg