My current schema is as below where a "Customer_ERP_Auto" node (in brown) gets connected to other related "Customer_ERP_Auto" nodes via multiple relationships.
My Objective here is to create a new “Customer_Master” node for every such group / cluster of nodes connected using the "FUZZY_SIMILARITY" relationship. The newly created "Customer_Master" node has to link with all the nodes in the group using the “HAS_MASTER” relationship as shown below.
I tried creating the below Cypher query for this purpose.
Hi @glilienfield,
Thanks for your quick response. Conceptually, I want a Customer_ERP_Auto node to get connected to only one common "main" node. I use the "FUZZY_SIMILARITY" relationship to identify related nodes to a give node 'a' as I want to associate the node 'a' and all its associated nodes using "FUZZY_SIMILARITY" relationship to get connected to the same "Customer_Master" node using the "HAS_MASTER" relationship.
Appreciate if you could help me in correcting the above cypher query to fulfill this requirement.
The first line in your first query is going to result in multiple rows with different values for 'a'. Assuming there are no has_master relationships yet, you will then get many rows with multiple values of 'a' from the 'data driven' query of the iterate procedure.
In the processing query, all the customer_ids values for each 'a' will pass through the list comprehension operation because no has_master relationship has been created yet. The result will be one main node for each value of 'a' and a relationship from each new main node to each customer_id nodes corresponding to its 'a' node.
I am not sure of the requirement. it seems in your conceptional figure that you just are connecting each node to a common 'main' node. How does the FUZZY_SIMILARITY relationship influent what gets connected to a main node?