Closed MustangYun closed 2 years ago
Hi @MustangYun, can you share the Apache Spark code that causes this issue? Which version of Spark, Scala and connector are you using?
Thank you
Did you define constraints on Customer(CUST_NO)
and Customer(interest_NO)
?
@MustangYun ping :)
Closed for lack of feedback feel free to reopen it in future
Feature description (Mandatory)
Nodes have already been created in the past, but if you add only a relationship, a duplicate node is created again.
Considered alternatives
There is a table containing the customer's subscription information and a table containing information about the people the customer follows. And information about the people the customers follow is included in the customer subscriptions table. That is, the IDs of the people you follow must be in the IDs of the customer subscription information table.
Please add the merge function. The example source code I made in neo4j is as follows.
LOAD CSV WITH HEADERS FROM 'customer.csv' AS ROW CREATE(c:Customer { custNo: ROW.ID, ...(skip) })
LOAD CSV WITH HEADERS FROM 'follow.csv' AS row
match (a:Customer),(b:Customer) where a.custNo=row.CUST_NO and b.custNo=row.followID merge(a)<-[r:follow]-(b)
How this feature can improve the project?
It would be nice if the merge function was added in scala so that no nodes are created, only relationships are created. Please in Scala language.