For completeness, an example is given that can be adapted to mass load relationships and their properties using neo4jclient.
public void CreateRelationships(List<RelationshipCommon> relationships) { graphClient.Cypher .Unwind(relationships, "relationship") .Match("(grant:GRANT)", "(target:THEME)") .Where("grant.node_id = relationship.SourceEntityId and target.node_id = relationship.TargetEntityId") .Create("grant-[r:IS_IN_THEME]->target") .Set("r.relationship_id = relationship.RelationshipId") .Set("r.grant_proportional_value = relationship.ProportionalValue") .ExecuteWithoutResults(); }
Relationships is a List collection of type RelationshipCommon. RelationshipCommon has the following structure
public class RelationshipCommon { public string SourceEntityId { get; set; } public string TargetEntityId { get; set; } public string RelationshipId { get; set; } public long ProportionalValue { get; set; } }
In my VM development, this code loaded 54,000 relationships into 6s.
source share